Skip to content

Commit

Permalink
mfd: Store wm8350 struct in core device driver data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jan 8, 2012
1 parent f78d29f commit 18bf50a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/wm8350-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 18bf50a

Please sign in to comment.