[PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers

Florian Fainelli florian.fainelli at broadcom.com
Fri Aug 4 11:56:50 PDT 2023


On 8/4/23 07:27, Uwe Kleine-König wrote:
> Instead of requiring each driver to care for assigning the owner member
> of struct pwm_ops, handle that implicitly using a macro. Note that the
> owner member has to be moved to struct pwm_chip, as the ops structure
> usually lives in read-only memory and so cannot be modified.
> 
> The upside is that new lowlevel drivers cannot forget the assignment and
> save one line each. The pwm-crc driver didn't assign .owner, that's not
> a problem in practise though as the driver cannot be compiled as a
> module.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de> > ---

>   drivers/pwm/pwm-bcm-iproc.c           |  1 -
>   drivers/pwm/pwm-bcm-kona.c            |  1 -
>   drivers/pwm/pwm-bcm2835.c             |  1 -
>   drivers/pwm/pwm-brcmstb.c             |  1 -

Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com> # 
pwm-{bcm,brcm}*.c
-- 
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-mediatek/attachments/20230804/d1309947/attachment.p7s>


More information about the Linux-mediatek mailing list