[PATCH 02/11] pwm: bcm2835: Simplify using devm functions
Florian Fainelli
florian.fainelli at broadcom.com
Sun Nov 12 20:21:58 PST 2023
On 9/29/2023 9:19 AM, Uwe Kleine-König wrote:
> With devm_clk_get_enabled() the call to clk_disable_unprepare() can be
> dropped from the error path and the remove callback. With
> devm_pwmchip_add() pwmchip_remove() can be dropped. Then the remove
> callback is empty and can go away, too. With bcm2835_pwm_remove() the only
> user of platform_get_drvdata() is gone and so platform_set_drvdata() can
> be dropped from .probe(), too.
I don't think you can remove the call to platform_set_drvdata() because
that is implicitly used by bcm2835_pwm_{suspend,resume} and their calls
to dev_get_drvdata() as of:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pwm/pwm-bcm2835.c?id=119a508c4dc956c859854f40a504c577598b68a8
--
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4221 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231112/c720e844/attachment.p7s>
More information about the linux-arm-kernel
mailing list