diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-06-06 18:10:07 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-06-06 18:10:07 +0200 |
commit | 8c31b1635b91e48f867e010cd7bcd06393e5858a (patch) | |
tree | 4981add7e38e24724d255dedeb03f93be34d33ec /drivers/net/can | |
parent | gpio/pca953x.c: Interrupt pin is active-low (diff) | |
parent | gpio/mxc: convert gpio-mxc to use basic_mmio_gpio library (diff) | |
download | linux-8c31b1635b91e48f867e010cd7bcd06393e5858a.tar.xz linux-8c31b1635b91e48f867e010cd7bcd06393e5858a.zip |
Merge branch 'gpio/next-mx' into gpio/next
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/flexcan.c | 5 | ||||
-rw-r--r-- | drivers/net/can/slcan.c | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index d4990568baee..17678117ed69 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -923,7 +923,7 @@ static int __devinit flexcan_probe(struct platform_device *pdev) mem_size = resource_size(mem); if (!request_mem_region(mem->start, mem_size, pdev->name)) { err = -EBUSY; - goto failed_req; + goto failed_get; } base = ioremap(mem->start, mem_size); @@ -977,9 +977,8 @@ static int __devinit flexcan_probe(struct platform_device *pdev) iounmap(base); failed_map: release_mem_region(mem->start, mem_size); - failed_req: - clk_put(clk); failed_get: + clk_put(clk); failed_clock: return err; } diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 75622d54581f..1b49df6b2470 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -425,17 +425,16 @@ static void slc_setup(struct net_device *dev) * in parallel */ -static unsigned int slcan_receive_buf(struct tty_struct *tty, +static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) { struct slcan *sl = (struct slcan *) tty->disc_data; - int bytes = count; if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) - return -ENODEV; + return; /* Read the characters out of the buffer */ - while (bytes--) { + while (count--) { if (fp && *fp++) { if (!test_and_set_bit(SLF_ERROR, &sl->flags)) sl->dev->stats.rx_errors++; @@ -444,8 +443,6 @@ static unsigned int slcan_receive_buf(struct tty_struct *tty, } slcan_unesc(sl, *cp++); } - - return count; } /************************************ |