lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 11 May 2011 21:41:30 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Samuel Ortiz <sameo@...ux.intel.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [PATCH 16/19] mfd: Use mfd cell platform_data for tps6105x cells
 platform bits

2011/5/11 Samuel Ortiz <sameo@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ