Commit 3518fd4
Revert "gpio: Access
This reverts commit cc11f4e.
Commit cc11f4e ("gpio: Access `gpio_bus_type` in
gpiochip_setup_dev()") moved the bus type assignment from
gpiochip_add_data_with_key() to gpiochip_setup_dev().
This change introduced a bug where dev_printk() and friends might access
the bus name after gpiochip_add_data_with_key() but before
gpiochip_setup_dev() has run. In this window, the bus type is not yet
initialized, leading to empty bus names in logs.
Move the bus type assignment back to gpiochip_add_data_with_key() to
ensure the bus name is available before any potential users like
dev_printk().
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/all/CAMuHMdU0Xb=Moca5LUex+VxyHQa2-uYJgYf4hzHiSEjDCQQT=Q@mail.gmail.com/
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260313054112.1248074-1-tzungbi@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>gpio_bus_type in gpiochip_setup_dev()"1 parent 7673e4c commit 3518fd4
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | | - | |
913 | 911 | | |
914 | 912 | | |
915 | 913 | | |
| |||
1160 | 1158 | | |
1161 | 1159 | | |
1162 | 1160 | | |
| 1161 | + | |
1163 | 1162 | | |
1164 | 1163 | | |
1165 | 1164 | | |
| |||
1299 | 1298 | | |
1300 | 1299 | | |
1301 | 1300 | | |
1302 | | - | |
1303 | | - | |
| 1301 | + | |
| 1302 | + | |
1304 | 1303 | | |
1305 | 1304 | | |
1306 | 1305 | | |
| |||
0 commit comments