Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: tiecap: Set driver data before runtime PM enable

Runtime PM callbacks can be run right after runtime PM is enabled, so
make sure to set the driver data before that. This is unlikely to ever
happen with the current driver, but it doesn't hurt to follow best
practices anyway.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

+1 -1
+1 -1
drivers/pwm/pwm-tiecap.c
··· 254 254 return ret; 255 255 } 256 256 257 + platform_set_drvdata(pdev, pc); 257 258 pm_runtime_enable(&pdev->dev); 258 259 259 - platform_set_drvdata(pdev, pc); 260 260 return 0; 261 261 } 262 262