]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: sl28cpld: Set driver data before registering the PWM chip
authorThierry Reding <thierry.reding@gmail.com>
Fri, 4 Dec 2020 12:44:35 +0000 (13:44 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 17 Dec 2020 13:19:02 +0000 (14:19 +0100)
commit944ed0b9e30e2575697dff31a1a77a8d829c0a4b
tree7f162a9852f10e845eb165c4d1808cdcf6a6d96a
parent3d585c372ce49cd172549ff8cd5354bc6cf87f5a
pwm: sl28cpld: Set driver data before registering the PWM chip

It is good practice to set the driver data before registering a device
with a subsystem because the subsystem or the driver core may call back
into the driver implementation. This is not currently an issue, but to
prevent future changes from causing this to break unexpectedly, make
sure that the driver data is set before the PWM chip registration.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sl28cpld.c