]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/atm/he.c
[POWERPC] Document when printk is useable
[linux-2.6-omap-h63xx.git] / drivers / atm / he.c
index d33aba6864c247e34a05f3dd94db131a2c62fc50..ffc4a5a419465da6e749a084926b21c69fc2a50b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: he.c,v 1.18 2003/05/06 22:57:15 chas Exp $ */
-
 /*
 
   he.c
 #define HPRINTK(fmt,args...)   do { } while (0)
 #endif /* HE_DEBUG */
 
-/* version definition */
-
-static char *version = "$Id: he.c,v 1.18 2003/05/06 22:57:15 chas Exp $";
-
 /* declarations */
 
 static int he_open(struct atm_vcc *vcc);
@@ -366,7 +360,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
        struct he_dev *he_dev = NULL;
        int err = 0;
 
-       printk(KERN_INFO "he: %s\n", version);
+       printk(KERN_INFO "ATM he driver\n");
 
        if (pci_enable_device(pci_dev))
                return -EIO;
@@ -394,6 +388,11 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
        he_dev->atm_dev->dev_data = he_dev;
        atm_dev->dev_data = he_dev;
        he_dev->number = atm_dev->number;
+#ifdef USE_TASKLET
+       tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
+#endif
+       spin_lock_init(&he_dev->global_lock);
+
        if (he_start(atm_dev)) {
                he_stop(he_dev);
                err = -ENODEV;
@@ -1173,11 +1172,6 @@ he_start(struct atm_dev *dev)
        if ((err = he_init_irq(he_dev)) != 0)
                return err;
 
-#ifdef USE_TASKLET
-       tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
-#endif
-       spin_lock_init(&he_dev->global_lock);
-
        /* 4.11 enable pci bus controller state machines */
        host_cntl |= (OUTFF_ENB | CMDFF_ENB |
                                QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB);
@@ -1643,6 +1637,8 @@ he_stop(struct he_dev *he_dev)
 
        if (he_dev->rbpl_base) {
 #ifdef USE_RBPL_POOL
+               int i;
+
                for (i = 0; i < CONFIG_RBPL_SIZE; ++i) {
                        void *cpuaddr = he_dev->rbpl_virt[i].virt;
                        dma_addr_t dma_handle = he_dev->rbpl_base[i].phys;
@@ -1665,6 +1661,8 @@ he_stop(struct he_dev *he_dev)
 #ifdef USE_RBPS
        if (he_dev->rbps_base) {
 #ifdef USE_RBPS_POOL
+               int i;
+
                for (i = 0; i < CONFIG_RBPS_SIZE; ++i) {
                        void *cpuaddr = he_dev->rbps_virt[i].virt;
                        dma_addr_t dma_handle = he_dev->rbps_base[i].phys;
@@ -2933,7 +2931,7 @@ he_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
 
        left = *pos;
        if (!left--)
-               return sprintf(page, "%s\n", version);
+               return sprintf(page, "ATM he driver\n");
 
        if (!left--)
                return sprintf(page, "%s%s\n\n",
@@ -3002,8 +3000,7 @@ he_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
 
 /* eeprom routines  -- see 4.7 */
 
-u8
-read_prom_byte(struct he_dev *he_dev, int addr)
+static u8 read_prom_byte(struct he_dev *he_dev, int addr)
 {
        u32 val = 0, tmp_read = 0;
        int i, j = 0;