Skip to content

Commit ca63f8c

Browse files
Daniel Martenssondavem330
authored andcommitted
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>
1 parent 687b13e commit ca63f8c

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

‎drivers/net/caif/caif_hsi.c‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ int cfhsi_probe(struct platform_device *pdev)
10831083
return res;
10841084
}
10851085

1086-
static void cfhsi_shutdown(struct cfhsi *cfhsi, bool remove_platform_dev)
1086+
static void cfhsi_shutdown(struct cfhsi *cfhsi)
10871087
{
10881088
u8 *tx_buf, *rx_buf;
10891089

@@ -1093,14 +1093,6 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi, bool remove_platform_dev)
10931093
/* going to shutdown driver */
10941094
set_bit(CFHSI_SHUTDOWN, &cfhsi->bits);
10951095

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-
11041096
/* Flush workqueue */
11051097
flush_workqueue(cfhsi->wq);
11061098

@@ -1111,7 +1103,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi, bool remove_platform_dev)
11111103
/* Cancel pending RX request (if any) */
11121104
cfhsi->dev->cfhsi_rx_cancel(cfhsi->dev);
11131105

1114-
/* Flush again and destroy workqueue */
1106+
/* Destroy workqueue */
11151107
destroy_workqueue(cfhsi->wq);
11161108

11171109
/* Store bufferes: will be freed later. */
@@ -1150,7 +1142,7 @@ int cfhsi_remove(struct platform_device *pdev)
11501142
spin_unlock(&cfhsi_list_lock);
11511143

11521144
/* Shutdown driver. */
1153-
cfhsi_shutdown(cfhsi, false);
1145+
cfhsi_shutdown(cfhsi);
11541146

11551147
return 0;
11561148
}
@@ -1183,7 +1175,7 @@ static void __exit cfhsi_exit_module(void)
11831175
spin_unlock(&cfhsi_list_lock);
11841176

11851177
/* Shutdown driver. */
1186-
cfhsi_shutdown(cfhsi, true);
1178+
cfhsi_shutdown(cfhsi);
11871179

11881180
spin_lock(&cfhsi_list_lock);
11891181
}

0 commit comments

Comments
 (0)