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

caif-hsi: HSI-Platform device register and unregisters itself

Platform device is no longer removed from caif_hsi at shutdown.
The HSI-platform device must do it's own registration and unregistration.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Martensson and committed by
David S. Miller
ca63f8c7 687b13e9

+4 -12
+4 -12
drivers/net/caif/caif_hsi.c
··· 1083 1083 return res; 1084 1084 } 1085 1085 1086 - static void cfhsi_shutdown(struct cfhsi *cfhsi, bool remove_platform_dev) 1086 + static void cfhsi_shutdown(struct cfhsi *cfhsi) 1087 1087 { 1088 1088 u8 *tx_buf, *rx_buf; 1089 1089 ··· 1092 1092 1093 1093 /* going to shutdown driver */ 1094 1094 set_bit(CFHSI_SHUTDOWN, &cfhsi->bits); 1095 - 1096 - if (remove_platform_dev) { 1097 - /* Flush workqueue */ 1098 - flush_workqueue(cfhsi->wq); 1099 - 1100 - /* Notify device. */ 1101 - platform_device_unregister(cfhsi->pdev); 1102 - } 1103 1095 1104 1096 /* Flush workqueue */ 1105 1097 flush_workqueue(cfhsi->wq); ··· 1103 1111 /* Cancel pending RX request (if any) */ 1104 1112 cfhsi->dev->cfhsi_rx_cancel(cfhsi->dev); 1105 1113 1106 - /* Flush again and destroy workqueue */ 1114 + /* Destroy workqueue */ 1107 1115 destroy_workqueue(cfhsi->wq); 1108 1116 1109 1117 /* Store bufferes: will be freed later. */ ··· 1142 1150 spin_unlock(&cfhsi_list_lock); 1143 1151 1144 1152 /* Shutdown driver. */ 1145 - cfhsi_shutdown(cfhsi, false); 1153 + cfhsi_shutdown(cfhsi); 1146 1154 1147 1155 return 0; 1148 1156 } ··· 1175 1183 spin_unlock(&cfhsi_list_lock); 1176 1184 1177 1185 /* Shutdown driver. */ 1178 - cfhsi_shutdown(cfhsi, true); 1186 + cfhsi_shutdown(cfhsi); 1179 1187 1180 1188 spin_lock(&cfhsi_list_lock); 1181 1189 }