Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fsi: sbefifo: Convert to fsi bus probe mechanism

The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.

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/79dd5a9459f0719b7602165c89eb6fc24815f3b5.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
0cf9580a 573e29c5

+8 -9
+8 -9
drivers/fsi/fsi-sbefifo.c
··· 1022 1022 * Probe/remove 1023 1023 */ 1024 1024 1025 - static int sbefifo_probe(struct device *dev) 1025 + static int sbefifo_probe(struct fsi_device *fsi_dev) 1026 1026 { 1027 - struct fsi_device *fsi_dev = to_fsi_dev(dev); 1027 + struct device *dev = &fsi_dev->dev; 1028 1028 struct sbefifo *sbefifo; 1029 1029 struct device_node *np; 1030 1030 struct platform_device *child; ··· 1045 1045 1046 1046 sbefifo->magic = SBEFIFO_MAGIC; 1047 1047 sbefifo->fsi_dev = fsi_dev; 1048 - dev_set_drvdata(dev, sbefifo); 1048 + fsi_set_drvdata(fsi_dev, sbefifo); 1049 1049 mutex_init(&sbefifo->lock); 1050 1050 sbefifo->timeout_in_cmd_ms = SBEFIFO_TIMEOUT_IN_CMD; 1051 1051 sbefifo->timeout_start_rsp_ms = SBEFIFO_TIMEOUT_START_RSP; ··· 1101 1101 return 0; 1102 1102 } 1103 1103 1104 - static int sbefifo_remove(struct device *dev) 1104 + static void sbefifo_remove(struct fsi_device *fsi_dev) 1105 1105 { 1106 - struct sbefifo *sbefifo = dev_get_drvdata(dev); 1106 + struct device *dev = &fsi_dev->dev; 1107 + struct sbefifo *sbefifo = fsi_get_drvdata(fsi_dev); 1107 1108 1108 1109 dev_dbg(dev, "Removing sbefifo device...\n"); 1109 1110 ··· 1118 1117 fsi_free_minor(sbefifo->dev.devt); 1119 1118 device_for_each_child(dev, NULL, sbefifo_unregister_child); 1120 1119 put_device(&sbefifo->dev); 1121 - 1122 - return 0; 1123 1120 } 1124 1121 1125 1122 static const struct fsi_device_id sbefifo_ids[] = { ··· 1130 1131 1131 1132 static struct fsi_driver sbefifo_drv = { 1132 1133 .id_table = sbefifo_ids, 1134 + .probe = sbefifo_probe, 1135 + .remove = sbefifo_remove, 1133 1136 .drv = { 1134 1137 .name = DEVICE_NAME, 1135 - .probe = sbefifo_probe, 1136 - .remove = sbefifo_remove, 1137 1138 } 1138 1139 }; 1139 1140