diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-04-20 06:40:36 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-04-20 06:40:36 +0000 |
commit | dd4dcd736d9fffaeb400311d3b7945ed33e52e50 (patch) | |
tree | fd6c26b8d0853fb9f06af10fc1d187c0f863f87c /target/linux/atheros/files/drivers | |
parent | 4668cb866358f1ebab1d6867a0ba422e4a5b18b7 (diff) |
[atheros] nuke trailing whitespaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10872 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros/files/drivers')
4 files changed, 62 insertions, 62 deletions
diff --git a/target/linux/atheros/files/drivers/mtd/devices/spiflash.c b/target/linux/atheros/files/drivers/mtd/devices/spiflash.c index 7bfc252efe..c4c2016d8b 100644 --- a/target/linux/atheros/files/drivers/mtd/devices/spiflash.c +++ b/target/linux/atheros/files/drivers/mtd/devices/spiflash.c @@ -69,7 +69,7 @@ spin_lock_bh(&spidata->mutex); \ } \ } while (0) - + static __u32 spiflash_regread32(int reg); static void spiflash_regwrite32(int reg, __u32 data); @@ -132,7 +132,7 @@ struct opcodes { /* Driver private data structure */ struct spiflash_data { - struct mtd_info *mtd; + struct mtd_info *mtd; struct mtd_partition *parsed_parts; /* parsed partitions */ void *readaddr; /* memory mapped data for read */ void *mmraddr; /* memory mapped register space */ @@ -161,7 +161,7 @@ spiflash_regread32(int reg) return (*data); } -static void +static void spiflash_regwrite32(int reg, __u32 data) { volatile __u32 *addr = (__u32 *)(spidata->mmraddr + reg); @@ -171,7 +171,7 @@ spiflash_regwrite32(int reg, __u32 data) } -static __u32 +static __u32 spiflash_sendcmd (int op, u32 addr) { u32 reg; @@ -187,7 +187,7 @@ spiflash_sendcmd (int op, u32 addr) spiflash_regwrite32(SPI_FLASH_CTL, reg); busy_wait(spiflash_regread32(SPI_FLASH_CTL) & SPI_CTL_BUSY, 0); - + if (!ptr_opcode->rx_cnt) return 0; @@ -218,12 +218,12 @@ spiflash_sendcmd (int op, u32 addr) * Function returns 0 for failure. * and flashconfig_tbl array index for success. */ -static int +static int spiflash_probe_chip (void) { __u32 sig; int flash_size; - + /* Read the signature on the flash device */ spin_lock_bh(&spidata->mutex); sig = spiflash_sendcmd(SPI_RD_SIG, 0); @@ -267,7 +267,7 @@ retry: spin_unlock_bh(&spidata->mutex); schedule(); remove_wait_queue(&spidata->wq, &wait); - + if(signal_pending(current)) return 0; @@ -285,7 +285,7 @@ static inline void spiflash_done(void) wake_up(&spidata->wq); } -static int +static int spiflash_erase (struct mtd_info *mtd,struct erase_info *instr) { struct opcodes *ptr_opcode; @@ -312,7 +312,7 @@ spiflash_erase (struct mtd_info *mtd,struct erase_info *instr) spin_unlock_bh(&spidata->mutex); msleep(800); spin_lock_bh(&spidata->mutex); - + busy_wait(spiflash_sendcmd(SPI_RD_STATUS, 0) & SPI_STATUS_WIP, 20); spiflash_done(); @@ -322,15 +322,15 @@ spiflash_erase (struct mtd_info *mtd,struct erase_info *instr) return 0; } -static int +static int spiflash_read (struct mtd_info *mtd, loff_t from,size_t len,size_t *retlen,u_char *buf) { u8 *read_addr; - + /* sanity checks */ if (!len) return (0); if (from + len > mtd->size) return (-EINVAL); - + /* we always read len bytes */ *retlen = len; @@ -343,7 +343,7 @@ spiflash_read (struct mtd_info *mtd, loff_t from,size_t len,size_t *retlen,u_cha return 0; } -static int +static int spiflash_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u_char *buf) { u32 opcode, bytes_left; @@ -353,10 +353,10 @@ spiflash_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u /* sanity checks */ if (!len) return (0); if (to + len > mtd->size) return (-EINVAL); - + opcode = stm_opcodes[SPI_PAGE_PROGRAM].code; bytes_left = len; - + do { u32 xact_len, reg, page_offset, spi_data = 0; @@ -389,7 +389,7 @@ spiflash_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u spi_data = (buf[2] << 16) | (buf[1] << 8) | buf[0]; break; case 4: - spi_data = (buf[3] << 24) | (buf[2] << 16) | + spi_data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; break; default: @@ -439,7 +439,7 @@ static int spiflash_probe(struct platform_device *pdev) spin_lock_init(&spidata->mutex); init_waitqueue_head(&spidata->wq); spidata->state = FL_READY; - + if (!spidata->mmraddr) { printk (KERN_WARNING SPIFLASH "Failed to map flash device\n"); kfree(spidata); @@ -451,7 +451,7 @@ static int spiflash_probe(struct platform_device *pdev) kfree(spidata); return -ENXIO; } - + if (!(index = spiflash_probe_chip())) { printk (KERN_WARNING SPIFLASH "Found no serial flash device\n"); goto error; @@ -483,9 +483,9 @@ static int spiflash_probe(struct platform_device *pdev) result = add_mtd_partitions(mtd, spidata->parsed_parts, num_parts); spidata->mtd = mtd; - + return (result); - + error: kfree(mtd); kfree(spidata); @@ -505,7 +505,7 @@ struct platform_driver spiflash_driver = { .remove = spiflash_remove, }; -int __init +int __init spiflash_init (void) { spidata = kmalloc(sizeof(struct spiflash_data), GFP_KERNEL); @@ -518,7 +518,7 @@ spiflash_init (void) return 0; } -void __exit +void __exit spiflash_exit (void) { kfree(spidata); diff --git a/target/linux/atheros/files/drivers/net/ar2313/ar2313.c b/target/linux/atheros/files/drivers/net/ar2313/ar2313.c index 68fcb587be..fb1efa19c1 100644 --- a/target/linux/atheros/files/drivers/net/ar2313/ar2313.c +++ b/target/linux/atheros/files/drivers/net/ar2313/ar2313.c @@ -14,7 +14,7 @@ * (at your option) any later version. * * Additional credits: - * This code is taken from John Taylor's Sibyte driver and then + * This code is taken from John Taylor's Sibyte driver and then * modified for the AR2313. */ @@ -134,7 +134,7 @@ #define CRC_LEN 4 #define RX_OFFSET 2 -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #define VLAN_HDR 4 #else #define VLAN_HDR 0 @@ -232,8 +232,8 @@ int __init ar2313_probe(struct platform_device *pdev) return (-ENXIO); } - /* - * When there's only one MAC, PHY regs are typically on ENET0, + /* + * When there's only one MAC, PHY regs are typically on ENET0, * even though the MAC might be on ENET1. * Needto remap PHY regs separately in this case */ @@ -270,7 +270,7 @@ int __init ar2313_probe(struct platform_device *pdev) sp->board_idx = BOARD_IDX_STATIC; if (ar2313_init(dev)) { - /* + /* * ar2313_init() calls ar2313_init_cleanup() on error. */ kfree(dev); @@ -295,7 +295,7 @@ int __init ar2313_probe(struct platform_device *pdev) sp->mii_bus.id = 0; sp->mii_bus.irq = kmalloc(sizeof(int), GFP_KERNEL); *sp->mii_bus.irq = PHY_POLL; - + mdiobus_register(&sp->mii_bus); if (mdiobus_probe(dev) != 0) { @@ -308,7 +308,7 @@ int __init ar2313_probe(struct platform_device *pdev) /* start link poll timer */ ar2313_setup_timer(dev); } - + return 0; } @@ -379,9 +379,9 @@ static void printMcList(struct net_device *dev) */ static void ar2313_multicast_list(struct net_device *dev) { - /* - * Always listen to broadcasts and - * treat IFF bits independently + /* + * Always listen to broadcasts and + * treat IFF bits independently */ struct ar2313_private *sp = (struct ar2313_private *) dev->priv; unsigned int recognise; @@ -420,7 +420,7 @@ static void rx_tasklet_cleanup(struct net_device *dev) { struct ar2313_private *sp = dev->priv; - /* + /* * Tasklet may be scheduled. Need to get it removed from the list * since we're about to free the struct. */ @@ -442,7 +442,7 @@ static int __exit ar2313_remove(struct platform_device *pdev) /* - * Restart the AR2313 ethernet controller. + * Restart the AR2313 ethernet controller. */ static int ar2313_restart(struct net_device *dev) { @@ -606,7 +606,7 @@ static void ar2313_link_timer_fn(unsigned long data) // autonegotiated value of half or full duplex. ar2313_check_link(dev); - // Loop faster when we don't have link. + // Loop faster when we don't have link. // This was needed to speed up the AP bootstrap time. if (sp->link == 0) { mod_timer(&sp->link_timer, jiffies + HZ / 2); @@ -728,7 +728,7 @@ static int ar2313_init(struct net_device *dev) struct ar2313_private *sp = dev->priv; int ecode = 0; - /* + /* * Allocate descriptors */ if (ar2313_allocate_descriptors(dev)) { @@ -738,7 +738,7 @@ static int ar2313_init(struct net_device *dev) goto init_error; } - /* + /* * Get the memory for the skb rings. */ if (sp->rx_skb == NULL) { @@ -767,7 +767,7 @@ static int ar2313_init(struct net_device *dev) } memset(sp->tx_skb, 0, sizeof(struct sk_buff *) * AR2313_DESCR_ENTRIES); - /* + /* * Set tx_csm before we start receiving interrupts, otherwise * the interrupt handler might think it is supposed to process * tx ints before we are up and running, which may cause a null @@ -778,23 +778,23 @@ static int ar2313_init(struct net_device *dev) sp->tx_prd = 0; sp->tx_csm = 0; - /* + /* * Zero the stats before starting the interface */ memset(&sp->stats, 0, sizeof(sp->stats)); - /* + /* * We load the ring here as there seem to be no way to tell the * firmware to wipe the ring without re-initializing it. */ ar2313_load_rx_ring(dev, RX_RING_SIZE); - /* + /* * Init hardware */ ar2313_reset_reg(dev); - /* + /* * Get the IRQ */ ecode = @@ -852,7 +852,7 @@ static void ar2313_load_rx_ring(struct net_device *dev, int nr_bufs) // partha: create additional room in the front for tx pkt capture skb_reserve(skb, 32); - /* + /* * Make sure IP header starts on a fresh cache line. */ skb->dev = dev; @@ -899,7 +899,7 @@ static int ar2313_rx_int(struct net_device *dev) idx = sp->cur_rx; - /* process at most the entire ring and then wait for another interrupt + /* process at most the entire ring and then wait for another interrupt */ while (1) { @@ -1081,7 +1081,7 @@ static irqreturn_t ar2313_interrupt(int irq, void *dev_id) unsigned int status, enabled; /* clear interrupt */ - /* + /* * Don't clear RI bit if currently disabled. */ status = sp->dma_regs->status; @@ -1090,7 +1090,7 @@ static irqreturn_t ar2313_interrupt(int irq, void *dev_id) if (status & DMA_STATUS_NIS) { /* normal status */ - /* + /* * Don't schedule rx processing if interrupt * is already disabled. */ @@ -1178,12 +1178,12 @@ static void ar2313_halt(struct net_device *dev) static int ar2313_close(struct net_device *dev) { #if 0 - /* + /* * Disable interrupts */ disable_irq(dev->irq); - /* + /* * Without (or before) releasing irq and stopping hardware, this * is an absolute non-sense, by the way. It will be reset instantly * by the first irq. @@ -1251,7 +1251,7 @@ static int ar2313_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) struct mii_ioctl_data *data = (struct mii_ioctl_data *) &ifr->ifr_data; struct ar2313_private *sp = dev->priv; int ret; - + switch (cmd) { case SIOCETHTOOL: @@ -1271,12 +1271,12 @@ static int ar2313_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) (ifr->ifr_data, dev->dev_addr, sizeof(dev->dev_addr))) return -EFAULT; return 0; - + case SIOCGMIIPHY: case SIOCGMIIREG: case SIOCSMIIREG: return phy_mii_ioctl(sp->phy_dev, data, cmd); - + default: break; } @@ -1314,7 +1314,7 @@ static void ar2313_adjust_link(struct net_device *dev) #define MII_ADDR(phy, reg) \ ((reg << MII_ADDR_REG_SHIFT) | (phy << MII_ADDR_PHY_SHIFT)) -static int +static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) { struct net_device *const dev = bus->priv; @@ -1326,7 +1326,7 @@ mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) return (ethernet->mii_data >> MII_DATA_SHIFT); } -static int +static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, u16 value) { diff --git a/target/linux/atheros/files/drivers/net/ar2313/ar2313.h b/target/linux/atheros/files/drivers/net/ar2313/ar2313.h index f1868e6c3c..d4299addcd 100644 --- a/target/linux/atheros/files/drivers/net/ar2313/ar2313.h +++ b/target/linux/atheros/files/drivers/net/ar2313/ar2313.h @@ -64,7 +64,7 @@ typedef struct { } ETHERNET_STRUCT; /******************************************************************** - * Interrupt controller + * Interrupt controller ********************************************************************/ typedef struct { @@ -118,7 +118,7 @@ struct ar2313_private { spinlock_t lock; /* Serialise access to device */ - /* + /* * RX and TX descriptors, must be adjacent */ ar2313_descr_t *rx_ring; @@ -128,19 +128,19 @@ struct ar2313_private { struct sk_buff **rx_skb; struct sk_buff **tx_skb; - /* + /* * RX elements */ u32 rx_skbprd; u32 cur_rx; - /* + /* * TX elements */ u32 tx_prd; u32 tx_csm; - /* + /* * Misc elements */ int board_idx; diff --git a/target/linux/atheros/files/drivers/net/ar2313/dma.h b/target/linux/atheros/files/drivers/net/ar2313/dma.h index 113827047b..6d478d21fe 100644 --- a/target/linux/atheros/files/drivers/net/ar2313/dma.h +++ b/target/linux/atheros/files/drivers/net/ar2313/dma.h @@ -16,13 +16,13 @@ * $Log: dma.h,v $ * Revision 1.3 2002/06/06 18:34:03 astichte * Added XXX_PhysicalAddress and XXX_VirtualAddress - * + * * Revision 1.2 2002/06/05 18:30:46 astichte * Removed IDTField - * + * * Revision 1.1 2002/05/29 17:33:21 sysarch * jba File moved from vcode/include/idt/acacia - * + * * ******************************************************************************/ |