]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pwm: core: use device_match_name() instead of strcmp(dev_name(...
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Oct 2024 14:26:34 +0000 (17:26 +0300)
committerUwe Kleine-König <ukleinek@kernel.org>
Fri, 25 Oct 2024 20:52:45 +0000 (22:52 +0200)
commitfdb62922ae89c17963f80abdd14b4d9f053bc962
tree74cf92263d869880c74f4fc08c58cd71aadd243d
parent664b5e466f915ad7fce87215ccfb038c47ace4fb
pwm: core: use device_match_name() instead of strcmp(dev_name(...

Use the dedicated helper for comparing device names against strings.

Note, the current code has a check for the dev_name() against NULL.
With the current implementations of the device_add() and dev_set_name()
it most likely a theoretical assumption that that might happen, while
I don't see how. Hence, that check has simply been removed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241025142704.405340-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c