* [PATCH 2/3] serial: ifx6x60: Remove superfluous casts when calling request_irq()
2015-04-23 14:15 [PATCH 1/3] serial: ifx6x60: Remove dangerous spi_driver casts Geert Uytterhoeven
@ 2015-04-23 14:15 ` Geert Uytterhoeven
2015-04-23 14:15 ` [PATCH 3/3] serial: SERIAL_IFX6X60 should depend on HAS_DMA Geert Uytterhoeven
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-04-23 14:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel, Geert Uytterhoeven
There's no need to cast the last parameter of {request,free}_irq() to
"void *", as any pointer type is accepted.
Remove the superfluous casts to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/tty/serial/ifx6x60.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 7d858a74ee38d8ce..536a33b99be9bb9d 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1175,7 +1175,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
ret = request_irq(gpio_to_irq(ifx_dev->gpio.reset_out),
ifx_spi_reset_interrupt,
IRQF_TRIGGER_RISING|IRQF_TRIGGER_FALLING, DRVNAME,
- (void *)ifx_dev);
+ ifx_dev);
if (ret) {
dev_err(&spi->dev, "Unable to get irq %x\n",
gpio_to_irq(ifx_dev->gpio.reset_out));
@@ -1185,9 +1185,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
ret = ifx_spi_reset(ifx_dev);
ret = request_irq(gpio_to_irq(ifx_dev->gpio.srdy),
- ifx_spi_srdy_interrupt,
- IRQF_TRIGGER_RISING, DRVNAME,
- (void *)ifx_dev);
+ ifx_spi_srdy_interrupt, IRQF_TRIGGER_RISING, DRVNAME,
+ ifx_dev);
if (ret) {
dev_err(&spi->dev, "Unable to get irq %x",
gpio_to_irq(ifx_dev->gpio.srdy));
@@ -1212,7 +1211,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
return 0;
error_ret7:
- free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), (void *)ifx_dev);
+ free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), ifx_dev);
error_ret6:
gpio_free(ifx_dev->gpio.srdy);
error_ret5:
@@ -1243,8 +1242,8 @@ static int ifx_spi_spi_remove(struct spi_device *spi)
/* stop activity */
tasklet_kill(&ifx_dev->io_work_tasklet);
/* free irq */
- free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), (void *)ifx_dev);
- free_irq(gpio_to_irq(ifx_dev->gpio.srdy), (void *)ifx_dev);
+ free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), ifx_dev);
+ free_irq(gpio_to_irq(ifx_dev->gpio.srdy), ifx_dev);
gpio_free(ifx_dev->gpio.srdy);
gpio_free(ifx_dev->gpio.mrdy);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 3/3] serial: SERIAL_IFX6X60 should depend on HAS_DMA
2015-04-23 14:15 [PATCH 1/3] serial: ifx6x60: Remove dangerous spi_driver casts Geert Uytterhoeven
2015-04-23 14:15 ` [PATCH 2/3] serial: ifx6x60: Remove superfluous casts when calling request_irq() Geert Uytterhoeven
@ 2015-04-23 14:15 ` Geert Uytterhoeven
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-04-23 14:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel, Geert Uytterhoeven
If NO_DMA=y:
drivers/built-in.o: In function `ifx_spi_free_device':
ifx6x60.c:(.text+0x96d9a): undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `ifx_spi_spi_probe':
ifx6x60.c:(.text+0x978a2): undefined reference to `dma_alloc_coherent'
While DMA is optional in this driver, and is used only if
ifx_modem_platform_data.use_dma is set, there are currently no in-tree
users of ifx_modem_platform_data (and thus of this driver), so just make
it depend on HAS_DMA.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/tty/serial/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index f8120c1bde14760f..daee183386368149 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1349,7 +1349,7 @@ config SERIAL_ALTERA_UART_CONSOLE
config SERIAL_IFX6X60
tristate "SPI protocol driver for Infineon 6x60 modem (EXPERIMENTAL)"
- depends on GPIOLIB && SPI
+ depends on GPIOLIB && SPI && HAS_DMA
help
Support for the IFX6x60 modem devices on Intel MID platforms.
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread