]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: Store wm8350 struct in core device driver data
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 8 Dec 2011 02:55:21 +0000 (10:55 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jan 2012 23:37:31 +0000 (00:37 +0100)
This will allow us to move to a more idiomatic MFD model as drivers
will be able to get the struct by looking at their parent device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm8350-core.c

index e81cc31e42020a8ceff6620d73b3f251ca6aeffd..dd1caaac55e4d4138ccc69b19997793418a76e7d 100644 (file)
@@ -573,6 +573,8 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
        u16 id1, id2, mask_rev;
        u16 cust_id, mode, chip_rev;
 
+       dev_set_drvdata(wm8350->dev, wm8350);
+
        /* get WM8350 revision and config mode */
        ret = wm8350->read_dev(wm8350, WM8350_RESET_ID, sizeof(id1), &id1);
        if (ret != 0) {