summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/ifx6x60.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-04-23 16:15:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:27:01 +0200
commit9a499db0325b8a8e2368f21fef66705b120f38ba (patch)
tree6f395fe02b2b74d2b4a0974badbbada121227dc2 /drivers/tty/serial/ifx6x60.c
parentadeede7319cb57e0709ffaebb761932915e46d9d (diff)
serial: ifx6x60: Remove dangerous spi_driver casts
Casting spi_driver pointers to "void *" when calling spi_{,un}register_driver() bypasses all type checking. Remove the superfluous casts to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/ifx6x60.c')
-rw-r--r--drivers/tty/serial/ifx6x60.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 590390970996..7d858a74ee38 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1381,7 +1381,7 @@ static void __exit ifx_spi_exit(void)
/* unregister */
tty_unregister_driver(tty_drv);
put_tty_driver(tty_drv);
- spi_unregister_driver((void *)&ifx_spi_driver);
+ spi_unregister_driver(&ifx_spi_driver);
unregister_reboot_notifier(&ifx_modem_reboot_notifier_block);
}
@@ -1420,7 +1420,7 @@ static int __init ifx_spi_init(void)
goto err_free_tty;
}
- result = spi_register_driver((void *)&ifx_spi_driver);
+ result = spi_register_driver(&ifx_spi_driver);
if (result) {
pr_err("%s: spi_register_driver failed(%d)",
DRVNAME, result);
@@ -1436,7 +1436,7 @@ static int __init ifx_spi_init(void)
return 0;
err_unreg_spi:
- spi_unregister_driver((void *)&ifx_spi_driver);
+ spi_unregister_driver(&ifx_spi_driver);
err_unreg_tty:
tty_unregister_driver(tty_drv);
err_free_tty: