lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 05/11] pwm: add support for sl28cpld PWM controller
On Fri, 05 Jun 2020, Michael Walle wrote:

> Am 2020-06-05 10:49, schrieb Lee Jones:
> [..]
> > > +static inline struct sl28cpld_pwm *to_sl28cpld_pwm(struct pwm_chip
> > > *chip)
> > > +{
> > > + return container_of(chip, struct sl28cpld_pwm, pwm_chip);
> > > +}
> >
> > Why not save yourself the trouble and just:
> >
> > struct sl28cpld_pwm *pwm = dev_get_drvdata(chip->dev);
>
> Is there a reason why not a single pwm driver uses something like that?

Copy/paste? Habit?

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2020-06-08 09:47    [W:0.108 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site