[PATCH v3 070/108] pwm: microchip-core: Make use of devm_pwmchip_alloc() function

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Nov 22 14:48:24 PST 2023


Hello Conor,

On Wed, Nov 22, 2023 at 11:14:21AM +0000, Conor Dooley wrote:
> On Tue, Nov 21, 2023 at 02:50:12PM +0100, Uwe Kleine-König wrote:
> > @@ -65,7 +64,7 @@ struct mchp_core_pwm_chip {
> >  
> >  static inline struct mchp_core_pwm_chip *to_mchp_core_pwm(struct pwm_chip *chip)
> >  {
> > -	return container_of(chip, struct mchp_core_pwm_chip, chip);
> > +	return pwmchip_priv(chip);
> >  }
> 
> I know this is likely a coccinelle job, but can we now delete things
> like to_mchp_core_pwm() if there's a standard helper for this now?

An upside of keeping this helper is that it yields the right type.
pwmchip_priv() returns a void *.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20231122/5a61ad7d/attachment.sig>


More information about the linux-riscv mailing list