pwm: Use device_get_match_data()
authorRob Herring <robh@kernel.org>
Thu, 26 Oct 2023 19:54:17 +0000 (14:54 -0500)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 20 Dec 2023 15:04:13 +0000 (16:04 +0100)
commit7ee2273197f1c1755ebdad8716eab50689401aff
tree2696d9b2304d1d84ee12ffd21f3a644ed24e980e
parentb0445a18d3eef36b7dc4e07a0ccb4f7178251942
pwm: Use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

As these drivers only do DT based matching, of_match_device() will never
return NULL if we've gotten to probe(). Therefore, the NULL check and
error returns can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-img.c
drivers/pwm/pwm-rockchip.c