diff options
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/irtty-sir.c | 10 | ||||
-rw-r--r-- | drivers/net/irda/ks959-sir.c | 1 | ||||
-rw-r--r-- | drivers/net/irda/ksdazzle-sir.c | 1 | ||||
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 30 | ||||
-rw-r--r-- | drivers/net/irda/sh_sir.c | 2 |
5 files changed, 26 insertions, 18 deletions
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index 3352b2443e5..30087ca23a0 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c @@ -124,8 +124,8 @@ static int irtty_change_speed(struct sir_dev *dev, unsigned speed) tty = priv->tty; mutex_lock(&tty->termios_mutex); - old_termios = *(tty->termios); - cflag = tty->termios->c_cflag; + old_termios = tty->termios; + cflag = tty->termios.c_cflag; tty_encode_baud_rate(tty, speed, speed); if (tty->ops->set_termios) tty->ops->set_termios(tty, &old_termios); @@ -281,15 +281,15 @@ static inline void irtty_stop_receiver(struct tty_struct *tty, int stop) int cflag; mutex_lock(&tty->termios_mutex); - old_termios = *(tty->termios); - cflag = tty->termios->c_cflag; + old_termios = tty->termios; + cflag = tty->termios.c_cflag; if (stop) cflag &= ~CREAD; else cflag |= CREAD; - tty->termios->c_cflag = cflag; + tty->termios.c_cflag = cflag; if (tty->ops->set_termios) tty->ops->set_termios(tty, &old_termios); mutex_unlock(&tty->termios_mutex); diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index 824e2a93fe8..5f3aeac3f86 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c @@ -542,6 +542,7 @@ static int ks959_net_open(struct net_device *netdev) sprintf(hwname, "usb#%d", kingsun->usbdev->devnum); kingsun->irlap = irlap_open(netdev, &kingsun->qos, hwname); if (!kingsun->irlap) { + err = -ENOMEM; dev_err(&kingsun->usbdev->dev, "irlap_open failed\n"); goto free_mem; } diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c index 5a278ab83c2..2d4b6a1ab20 100644 --- a/drivers/net/irda/ksdazzle-sir.c +++ b/drivers/net/irda/ksdazzle-sir.c @@ -436,6 +436,7 @@ static int ksdazzle_net_open(struct net_device *netdev) sprintf(hwname, "usb#%d", kingsun->usbdev->devnum); kingsun->irlap = irlap_open(netdev, &kingsun->qos, hwname); if (!kingsun->irlap) { + err = -ENOMEM; dev_err(&kingsun->usbdev->dev, "irlap_open failed\n"); goto free_mem; } diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 8d547670791..002a442bf73 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c @@ -28,9 +28,9 @@ #include <net/irda/irda_device.h> #include <mach/dma.h> -#include <mach/irda.h> -#include <mach/regs-uart.h> +#include <linux/platform_data/irda-pxaficp.h> #include <mach/regs-ost.h> +#include <mach/regs-uart.h> #define FICP __REG(0x40800000) /* Start of FICP area */ #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ @@ -112,6 +112,9 @@ struct pxa_irda { int txdma; int rxdma; + int uart_irq; + int icp_irq; + struct irlap_cb *irlap; struct qos_info qos; @@ -672,19 +675,19 @@ static int pxa_irda_start(struct net_device *dev) si->speed = 9600; - err = request_irq(IRQ_STUART, pxa_irda_sir_irq, 0, dev->name, dev); + err = request_irq(si->uart_irq, pxa_irda_sir_irq, 0, dev->name, dev); if (err) goto err_irq1; - err = request_irq(IRQ_ICP, pxa_irda_fir_irq, 0, dev->name, dev); + err = request_irq(si->icp_irq, pxa_irda_fir_irq, 0, dev->name, dev); if (err) goto err_irq2; /* * The interrupt must remain disabled for now. */ - disable_irq(IRQ_STUART); - disable_irq(IRQ_ICP); + disable_irq(si->uart_irq); + disable_irq(si->icp_irq); err = -EBUSY; si->rxdma = pxa_request_dma("FICP_RX",DMA_PRIO_LOW, pxa_irda_fir_dma_rx_irq, dev); @@ -720,8 +723,8 @@ static int pxa_irda_start(struct net_device *dev) /* * Now enable the interrupt and start the queue */ - enable_irq(IRQ_STUART); - enable_irq(IRQ_ICP); + enable_irq(si->uart_irq); + enable_irq(si->icp_irq); netif_start_queue(dev); printk(KERN_DEBUG "pxa_ir: irda driver opened\n"); @@ -738,9 +741,9 @@ err_dma_rx_buff: err_tx_dma: pxa_free_dma(si->rxdma); err_rx_dma: - free_irq(IRQ_ICP, dev); + free_irq(si->icp_irq, dev); err_irq2: - free_irq(IRQ_STUART, dev); + free_irq(si->uart_irq, dev); err_irq1: return err; @@ -760,8 +763,8 @@ static int pxa_irda_stop(struct net_device *dev) si->irlap = NULL; } - free_irq(IRQ_STUART, dev); - free_irq(IRQ_ICP, dev); + free_irq(si->uart_irq, dev); + free_irq(si->icp_irq, dev); pxa_free_dma(si->rxdma); pxa_free_dma(si->txdma); @@ -851,6 +854,9 @@ static int pxa_irda_probe(struct platform_device *pdev) si->dev = &pdev->dev; si->pdata = pdev->dev.platform_data; + si->uart_irq = platform_get_irq(pdev, 0); + si->icp_irq = platform_get_irq(pdev, 1); + si->sir_clk = clk_get(&pdev->dev, "UARTCLK"); si->fir_clk = clk_get(&pdev->dev, "FICPCLK"); if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) { diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c index 256eddf1f75..79510942556 100644 --- a/drivers/net/irda/sh_sir.c +++ b/drivers/net/irda/sh_sir.c @@ -280,7 +280,7 @@ static int sh_sir_set_baudrate(struct sh_sir_self *self, u32 baudrate) } clk = clk_get(NULL, "irda_clk"); - if (!clk) { + if (IS_ERR(clk)) { dev_err(dev, "can not get irda_clk\n"); return -EIO; } |