Thread (74 messages) 74 messages, 8 authors, 2020-06-10

Re: [PATCH v4 05/11] pwm: add support for sl28cpld PWM controller

From: Michael Walle <hidden>
Date: 2020-06-05 18:18:05
Also in: linux-arm-kernel, linux-gpio, linux-hwmon, linux-pwm, linux-watchdog, lkml

Am 2020-06-05 10:49, schrieb Lee Jones:
[..]
quoted
+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?

-michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help