]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtc: s5m: cache device type during probe
authorAndré Draszik <andre.draszik@linaro.org>
Wed, 9 Apr 2025 20:37:46 +0000 (21:37 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 23 Jun 2025 21:58:39 +0000 (23:58 +0200)
commit002cc0ee90e6172ef40ae95c248bf6ce67fb3f3f
tree8d4292f3cd118533c3df35c97e0ecddcf4e9cf13
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
rtc: s5m: cache device type during probe

platform_get_device_id() is called mulitple times during probe to
retrieve the device type. This makes the code harder to read than
necessary.

Just get the type once, which also trims the lengths of the lines
involved.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-25-d66d5f39b6bf@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-s5m.c