]> 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)
commitf1a1d9e7990712a3fe8084297f233a9a28f2cb59
tree7f162a9852f10e845eb165c4d1808cdcf6a6d96a
parentf3f4023a84cabe860948a39d3c7fea48ed7dbc56
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