Re: [PATCH 16/19] mfd: Use mfd cell platform_data for tps6105x cells platform bits

Linus Walleij
2011-05-11T19:41:32Z

2011/5/11 Samuel Ortiz <sameo@linux.intel.com>:
>> > -       struct tps6105x *tps6105x = mfd_get_data(pdev);
>> > +       struct tps6105x *tps6105x = pdev->dev.platform_data;
>>
>> Can you use platform_get_drvdata(pdev); instead?
>
> I suppose you mean dev_get_platdata() ?

Yes, sorry.

>> >  static int __devexit tps6105x_regulator_remove(struct platform_device *pdev)
>> >  {
>> > -       struct tps6105x *tps6105x = platform_get_drvdata(pdev);
>> > +       struct tps6105x *tps6105x = pdev->dev.platform_data;
>>
>> And this is a NO-OP, actually a bug in the present code, just leave it
>> as it is and the other changes removing the mfd->mfd_data fixes the bug...
>
> I agree it's a bug in the current code. But I need to fetch the platform_data
> pointer, so here again I would have to call dev_get_platdata().

Yes again, you're right.

I was mainly after using the pretty accessor functions rather than direct
dereferencing, no big deal.

Thanks,
Linus Walleij