Skip to content

Commit

Permalink
mfd: Use mfd cell platform_data for wl1273 cells platform bits
Browse files Browse the repository at this point in the history
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Matti Aaltonen <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
Samuel Ortiz committed May 26, 2011
1 parent 8ac93be commit 9e55469
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/media/radio/radio-wl1273.c
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev)

static int __devinit wl1273_fm_radio_probe(struct platform_device *pdev)
{
struct wl1273_core **core = mfd_get_data(pdev);
struct wl1273_core **core = pdev->dev.platform_data;
struct wl1273_device *radio;
struct v4l2_ctrl *ctrl;
int r = 0;
Expand Down
6 changes: 4 additions & 2 deletions drivers/mfd/wl1273-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,

cell = &core->cells[children];
cell->name = "wl1273_fm_radio";
cell->mfd_data = &core;
cell->platform_data = &core;
cell->pdata_size = sizeof(core);
children++;

core->read = wl1273_fm_read_reg;
Expand All @@ -231,7 +232,8 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,

dev_dbg(&client->dev, "%s: Have codec.\n", __func__);
cell->name = "wl1273-codec";
cell->mfd_data = &core;
cell->platform_data = &core;
cell->pdata_size = sizeof(core);
children++;
}

Expand Down
3 changes: 1 addition & 2 deletions sound/soc/codecs/wl1273.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ EXPORT_SYMBOL_GPL(wl1273_get_format);

static int wl1273_probe(struct snd_soc_codec *codec)
{
struct wl1273_core **core =
mfd_get_data(to_platform_device(codec->dev));
struct wl1273_core **core = codec->dev->platform_data;
struct wl1273_priv *wl1273;
int r;

Expand Down

0 comments on commit 9e55469

Please sign in to comment.