Skip to content

Commit 03db6a8

Browse files
ukleinekgregkh
authored andcommitted
fsi: Assign driver's bus in fsi_driver_register()
Instead of letting each driver assign the bus, do it once in the fsi driver register function. Simplify the fsi drivers that are living in drivers/fsi accordingly. Once all fsi drivers dropped assigning the bus, fsi_bus_type can be made a static variable. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Acked-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/54804c2cd4d84a6b5fb679831122b6acdd36b168.1765279318.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 94c37d4 commit 03db6a8

5 files changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/fsi/fsi-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,8 @@ int fsi_driver_register(struct fsi_driver *fsi_drv)
13941394
if (!fsi_drv->id_table)
13951395
return -EINVAL;
13961396

1397+
fsi_drv->drv.bus = &fsi_bus_type;
1398+
13971399
return driver_register(&fsi_drv->drv);
13981400
}
13991401
EXPORT_SYMBOL_GPL(fsi_driver_register);

drivers/fsi/fsi-master-hub.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ static struct fsi_driver hub_master_driver = {
288288
.id_table = hub_master_ids,
289289
.drv = {
290290
.name = "fsi-master-hub",
291-
.bus = &fsi_bus_type,
292291
.probe = hub_master_probe,
293292
.remove = hub_master_remove,
294293
}

drivers/fsi/fsi-sbefifo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,6 @@ static struct fsi_driver sbefifo_drv = {
11331133
.id_table = sbefifo_ids,
11341134
.drv = {
11351135
.name = DEVICE_NAME,
1136-
.bus = &fsi_bus_type,
11371136
.probe = sbefifo_probe,
11381137
.remove = sbefifo_remove,
11391138
}

drivers/fsi/fsi-scom.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ static struct fsi_driver scom_drv = {
606606
.id_table = scom_ids,
607607
.drv = {
608608
.name = "scom",
609-
.bus = &fsi_bus_type,
610609
.of_match_table = scom_of_ids,
611610
.probe = scom_probe,
612611
.remove = scom_remove,

drivers/fsi/i2cr-scom.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ static struct fsi_driver i2cr_scom_driver = {
140140
.id_table = i2cr_scom_ids,
141141
.drv = {
142142
.name = "i2cr_scom",
143-
.bus = &fsi_bus_type,
144143
.of_match_table = i2cr_scom_of_ids,
145144
.probe = i2cr_scom_probe,
146145
.remove = i2cr_scom_remove,

0 commit comments

Comments
 (0)