diff options
Diffstat (limited to 'drivers/parisc')
-rw-r--r-- | drivers/parisc/asp.c | 1 | ||||
-rw-r--r-- | drivers/parisc/ccio-dma.c | 2 | ||||
-rw-r--r-- | drivers/parisc/ccio-rm-dma.c | 1 | ||||
-rw-r--r-- | drivers/parisc/dino.c | 2 | ||||
-rw-r--r-- | drivers/parisc/eisa.c | 2 | ||||
-rw-r--r-- | drivers/parisc/eisa_eeprom.c | 10 | ||||
-rw-r--r-- | drivers/parisc/eisa_enumerator.c | 2 | ||||
-rw-r--r-- | drivers/parisc/gsc.c | 3 | ||||
-rw-r--r-- | drivers/parisc/iosapic.c | 2 | ||||
-rw-r--r-- | drivers/parisc/led.c | 66 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 11 | ||||
-rw-r--r-- | drivers/parisc/superio.c | 4 |
12 files changed, 44 insertions, 62 deletions
diff --git a/drivers/parisc/asp.c b/drivers/parisc/asp.c index 9ca21098b146..6a1ab2512a53 100644 --- a/drivers/parisc/asp.c +++ b/drivers/parisc/asp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <asm/io.h> | 19 | #include <asm/io.h> |
21 | #include <asm/led.h> | 20 | #include <asm/led.h> |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index a6b4a5a53d40..f511e70d454c 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -650,7 +650,7 @@ ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt) | |||
650 | * Mark the I/O Pdir entries invalid and blow away the corresponding I/O | 650 | * Mark the I/O Pdir entries invalid and blow away the corresponding I/O |
651 | * TLB entries. | 651 | * TLB entries. |
652 | * | 652 | * |
653 | * FIXME: at some threshhold it might be "cheaper" to just blow | 653 | * FIXME: at some threshold it might be "cheaper" to just blow |
654 | * away the entire I/O TLB instead of individual entries. | 654 | * away the entire I/O TLB instead of individual entries. |
655 | * | 655 | * |
656 | * FIXME: Uturn has 256 TLB entries. We don't need to purge every | 656 | * FIXME: Uturn has 256 TLB entries. We don't need to purge every |
diff --git a/drivers/parisc/ccio-rm-dma.c b/drivers/parisc/ccio-rm-dma.c index 356b8357bccc..f78f6f1aef47 100644 --- a/drivers/parisc/ccio-rm-dma.c +++ b/drivers/parisc/ccio-rm-dma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/gfp.h> | ||
41 | 42 | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | 44 | ||
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index d69bde6a2343..c542c7bb7454 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -354,7 +354,7 @@ static unsigned int dino_startup_irq(unsigned int irq) | |||
354 | } | 354 | } |
355 | 355 | ||
356 | static struct irq_chip dino_interrupt_type = { | 356 | static struct irq_chip dino_interrupt_type = { |
357 | .typename = "GSC-PCI", | 357 | .name = "GSC-PCI", |
358 | .startup = dino_startup_irq, | 358 | .startup = dino_startup_irq, |
359 | .shutdown = dino_disable_irq, | 359 | .shutdown = dino_disable_irq, |
360 | .enable = dino_enable_irq, | 360 | .enable = dino_enable_irq, |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 51220749cb65..46f503fb7fc5 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -189,7 +189,7 @@ static unsigned int eisa_startup_irq(unsigned int irq) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | static struct irq_chip eisa_interrupt_type = { | 191 | static struct irq_chip eisa_interrupt_type = { |
192 | .typename = "EISA", | 192 | .name = "EISA", |
193 | .startup = eisa_startup_irq, | 193 | .startup = eisa_startup_irq, |
194 | .shutdown = eisa_disable_irq, | 194 | .shutdown = eisa_disable_irq, |
195 | .enable = eisa_enable_irq, | 195 | .enable = eisa_enable_irq, |
diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c index 8c0b26e9b98a..cce00ed81f37 100644 --- a/drivers/parisc/eisa_eeprom.c +++ b/drivers/parisc/eisa_eeprom.c | |||
@@ -75,17 +75,8 @@ static ssize_t eisa_eeprom_read(struct file * file, | |||
75 | return ret; | 75 | return ret; |
76 | } | 76 | } |
77 | 77 | ||
78 | static int eisa_eeprom_ioctl(struct inode *inode, struct file *file, | ||
79 | unsigned int cmd, | ||
80 | unsigned long arg) | ||
81 | { | ||
82 | return -ENOTTY; | ||
83 | } | ||
84 | |||
85 | static int eisa_eeprom_open(struct inode *inode, struct file *file) | 78 | static int eisa_eeprom_open(struct inode *inode, struct file *file) |
86 | { | 79 | { |
87 | cycle_kernel_lock(); | ||
88 | |||
89 | if (file->f_mode & FMODE_WRITE) | 80 | if (file->f_mode & FMODE_WRITE) |
90 | return -EINVAL; | 81 | return -EINVAL; |
91 | 82 | ||
@@ -104,7 +95,6 @@ static const struct file_operations eisa_eeprom_fops = { | |||
104 | .owner = THIS_MODULE, | 95 | .owner = THIS_MODULE, |
105 | .llseek = eisa_eeprom_llseek, | 96 | .llseek = eisa_eeprom_llseek, |
106 | .read = eisa_eeprom_read, | 97 | .read = eisa_eeprom_read, |
107 | .ioctl = eisa_eeprom_ioctl, | ||
108 | .open = eisa_eeprom_open, | 98 | .open = eisa_eeprom_open, |
109 | .release = eisa_eeprom_release, | 99 | .release = eisa_eeprom_release, |
110 | }; | 100 | }; |
diff --git a/drivers/parisc/eisa_enumerator.c b/drivers/parisc/eisa_enumerator.c index 0be1d50645ab..caa153133754 100644 --- a/drivers/parisc/eisa_enumerator.c +++ b/drivers/parisc/eisa_enumerator.c | |||
@@ -460,7 +460,7 @@ static int init_slot(int slot, struct eeprom_eisa_slot_info *es) | |||
460 | slot, id_string); | 460 | slot, id_string); |
461 | 461 | ||
462 | print_eisa_id(id_string, es->eisa_slot_id); | 462 | print_eisa_id(id_string, es->eisa_slot_id); |
463 | printk(" expected %s \n", id_string); | 463 | printk(" expected %s\n", id_string); |
464 | 464 | ||
465 | return -1; | 465 | return -1; |
466 | 466 | ||
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index 647adc9f85ad..20a1bce1a031 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | 23 | ||
25 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
@@ -149,7 +148,7 @@ static unsigned int gsc_asic_startup_irq(unsigned int irq) | |||
149 | } | 148 | } |
150 | 149 | ||
151 | static struct irq_chip gsc_asic_interrupt_type = { | 150 | static struct irq_chip gsc_asic_interrupt_type = { |
152 | .typename = "GSC-ASIC", | 151 | .name = "GSC-ASIC", |
153 | .startup = gsc_asic_startup_irq, | 152 | .startup = gsc_asic_startup_irq, |
154 | .shutdown = gsc_asic_disable_irq, | 153 | .shutdown = gsc_asic_disable_irq, |
155 | .enable = gsc_asic_enable_irq, | 154 | .enable = gsc_asic_enable_irq, |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 88e333553212..c76836727cae 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -730,7 +730,7 @@ static int iosapic_set_affinity_irq(unsigned int irq, | |||
730 | #endif | 730 | #endif |
731 | 731 | ||
732 | static struct irq_chip iosapic_interrupt_type = { | 732 | static struct irq_chip iosapic_interrupt_type = { |
733 | .typename = "IO-SAPIC-level", | 733 | .name = "IO-SAPIC-level", |
734 | .startup = iosapic_startup_irq, | 734 | .startup = iosapic_startup_irq, |
735 | .shutdown = iosapic_disable_irq, | 735 | .shutdown = iosapic_disable_irq, |
736 | .enable = iosapic_enable_irq, | 736 | .enable = iosapic_enable_irq, |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 9581d3619450..188bc8496a26 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/kernel_stat.h> | 38 | #include <linux/kernel_stat.h> |
39 | #include <linux/reboot.h> | 39 | #include <linux/reboot.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/seq_file.h> | ||
41 | #include <linux/ctype.h> | 42 | #include <linux/ctype.h> |
42 | #include <linux/blkdev.h> | 43 | #include <linux/blkdev.h> |
43 | #include <linux/workqueue.h> | 44 | #include <linux/workqueue.h> |
@@ -147,41 +148,34 @@ device_initcall(start_task); | |||
147 | static void (*led_func_ptr) (unsigned char) __read_mostly; | 148 | static void (*led_func_ptr) (unsigned char) __read_mostly; |
148 | 149 | ||
149 | #ifdef CONFIG_PROC_FS | 150 | #ifdef CONFIG_PROC_FS |
150 | static int led_proc_read(char *page, char **start, off_t off, int count, | 151 | static int led_proc_show(struct seq_file *m, void *v) |
151 | int *eof, void *data) | ||
152 | { | 152 | { |
153 | char *out = page; | 153 | switch ((long)m->private) |
154 | int len; | ||
155 | |||
156 | switch ((long)data) | ||
157 | { | 154 | { |
158 | case LED_NOLCD: | 155 | case LED_NOLCD: |
159 | out += sprintf(out, "Heartbeat: %d\n", led_heartbeat); | 156 | seq_printf(m, "Heartbeat: %d\n", led_heartbeat); |
160 | out += sprintf(out, "Disk IO: %d\n", led_diskio); | 157 | seq_printf(m, "Disk IO: %d\n", led_diskio); |
161 | out += sprintf(out, "LAN Rx/Tx: %d\n", led_lanrxtx); | 158 | seq_printf(m, "LAN Rx/Tx: %d\n", led_lanrxtx); |
162 | break; | 159 | break; |
163 | case LED_HASLCD: | 160 | case LED_HASLCD: |
164 | out += sprintf(out, "%s\n", lcd_text); | 161 | seq_printf(m, "%s\n", lcd_text); |
165 | break; | 162 | break; |
166 | default: | 163 | default: |
167 | *eof = 1; | ||
168 | return 0; | 164 | return 0; |
169 | } | 165 | } |
166 | return 0; | ||
167 | } | ||
170 | 168 | ||
171 | len = out - page - off; | 169 | static int led_proc_open(struct inode *inode, struct file *file) |
172 | if (len < count) { | 170 | { |
173 | *eof = 1; | 171 | return single_open(file, led_proc_show, PDE(inode)->data); |
174 | if (len <= 0) return 0; | ||
175 | } else { | ||
176 | len = count; | ||
177 | } | ||
178 | *start = page + off; | ||
179 | return len; | ||
180 | } | 172 | } |
181 | 173 | ||
182 | static int led_proc_write(struct file *file, const char *buf, | 174 | |
183 | unsigned long count, void *data) | 175 | static ssize_t led_proc_write(struct file *file, const char *buf, |
176 | size_t count, loff_t *pos) | ||
184 | { | 177 | { |
178 | void *data = PDE(file->f_path.dentry->d_inode)->data; | ||
185 | char *cur, lbuf[count + 1]; | 179 | char *cur, lbuf[count + 1]; |
186 | int d; | 180 | int d; |
187 | 181 | ||
@@ -234,6 +228,15 @@ parse_error: | |||
234 | return -EINVAL; | 228 | return -EINVAL; |
235 | } | 229 | } |
236 | 230 | ||
231 | static const struct file_operations led_proc_fops = { | ||
232 | .owner = THIS_MODULE, | ||
233 | .open = led_proc_open, | ||
234 | .read = seq_read, | ||
235 | .llseek = seq_lseek, | ||
236 | .release = single_release, | ||
237 | .write = led_proc_write, | ||
238 | }; | ||
239 | |||
237 | static int __init led_create_procfs(void) | 240 | static int __init led_create_procfs(void) |
238 | { | 241 | { |
239 | struct proc_dir_entry *proc_pdc_root = NULL; | 242 | struct proc_dir_entry *proc_pdc_root = NULL; |
@@ -243,19 +246,15 @@ static int __init led_create_procfs(void) | |||
243 | 246 | ||
244 | proc_pdc_root = proc_mkdir("pdc", 0); | 247 | proc_pdc_root = proc_mkdir("pdc", 0); |
245 | if (!proc_pdc_root) return -1; | 248 | if (!proc_pdc_root) return -1; |
246 | ent = create_proc_entry("led", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); | 249 | ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, |
250 | &led_proc_fops, (void *)LED_NOLCD); /* LED */ | ||
247 | if (!ent) return -1; | 251 | if (!ent) return -1; |
248 | ent->data = (void *)LED_NOLCD; /* LED */ | ||
249 | ent->read_proc = led_proc_read; | ||
250 | ent->write_proc = led_proc_write; | ||
251 | 252 | ||
252 | if (led_type == LED_HASLCD) | 253 | if (led_type == LED_HASLCD) |
253 | { | 254 | { |
254 | ent = create_proc_entry("lcd", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); | 255 | ent = proc_create_data("lcd", S_IRUGO|S_IWUSR, proc_pdc_root, |
256 | &led_proc_fops, (void *)LED_HASLCD); /* LCD */ | ||
255 | if (!ent) return -1; | 257 | if (!ent) return -1; |
256 | ent->data = (void *)LED_HASLCD; /* LCD */ | ||
257 | ent->read_proc = led_proc_read; | ||
258 | ent->write_proc = led_proc_write; | ||
259 | } | 258 | } |
260 | 259 | ||
261 | return 0; | 260 | return 0; |
@@ -352,11 +351,9 @@ static __inline__ int led_get_net_activity(void) | |||
352 | 351 | ||
353 | rx_total = tx_total = 0; | 352 | rx_total = tx_total = 0; |
354 | 353 | ||
355 | /* we are running as a workqueue task, so locking dev_base | 354 | /* we are running as a workqueue task, so we can use an RCU lookup */ |
356 | * for reading should be OK */ | ||
357 | read_lock(&dev_base_lock); | ||
358 | rcu_read_lock(); | 355 | rcu_read_lock(); |
359 | for_each_netdev(&init_net, dev) { | 356 | for_each_netdev_rcu(&init_net, dev) { |
360 | const struct net_device_stats *stats; | 357 | const struct net_device_stats *stats; |
361 | struct in_device *in_dev = __in_dev_get_rcu(dev); | 358 | struct in_device *in_dev = __in_dev_get_rcu(dev); |
362 | if (!in_dev || !in_dev->ifa_list) | 359 | if (!in_dev || !in_dev->ifa_list) |
@@ -368,7 +365,6 @@ static __inline__ int led_get_net_activity(void) | |||
368 | tx_total += stats->tx_packets; | 365 | tx_total += stats->tx_packets; |
369 | } | 366 | } |
370 | rcu_read_unlock(); | 367 | rcu_read_unlock(); |
371 | read_unlock(&dev_base_lock); | ||
372 | 368 | ||
373 | retval = 0; | 369 | retval = 0; |
374 | 370 | ||
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 13a64bc081b6..1062b8ffe244 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -481,7 +481,7 @@ pdcspath_attr_store(struct kobject *kobj, struct attribute *attr, | |||
481 | return ret; | 481 | return ret; |
482 | } | 482 | } |
483 | 483 | ||
484 | static struct sysfs_ops pdcspath_attr_ops = { | 484 | static const struct sysfs_ops pdcspath_attr_ops = { |
485 | .show = pdcspath_attr_show, | 485 | .show = pdcspath_attr_show, |
486 | .store = pdcspath_attr_store, | 486 | .store = pdcspath_attr_store, |
487 | }; | 487 | }; |
@@ -779,12 +779,9 @@ static ssize_t pdcs_auto_write(struct kobject *kobj, | |||
779 | read_unlock(&pathentry->rw_lock); | 779 | read_unlock(&pathentry->rw_lock); |
780 | 780 | ||
781 | DPRINTK("%s: flags before: 0x%X\n", __func__, flags); | 781 | DPRINTK("%s: flags before: 0x%X\n", __func__, flags); |
782 | 782 | ||
783 | temp = in; | 783 | temp = skip_spaces(in); |
784 | 784 | ||
785 | while (*temp && isspace(*temp)) | ||
786 | temp++; | ||
787 | |||
788 | c = *temp++ - '0'; | 785 | c = *temp++ - '0'; |
789 | if ((c != 0) && (c != 1)) | 786 | if ((c != 0) && (c != 1)) |
790 | goto parse_error; | 787 | goto parse_error; |
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 675f04e6597a..f7806d81f1e0 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -169,7 +169,7 @@ superio_init(struct pci_dev *pcidev) | |||
169 | /* ...then properly fixup the USB to point at suckyio PIC */ | 169 | /* ...then properly fixup the USB to point at suckyio PIC */ |
170 | sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev); | 170 | sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev); |
171 | 171 | ||
172 | printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i) \n", | 172 | printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i)\n", |
173 | pci_name(pdev), pdev->irq); | 173 | pci_name(pdev), pdev->irq); |
174 | 174 | ||
175 | pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base); | 175 | pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base); |
@@ -326,7 +326,7 @@ static unsigned int superio_startup_irq(unsigned int irq) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | static struct irq_chip superio_interrupt_type = { | 328 | static struct irq_chip superio_interrupt_type = { |
329 | .typename = SUPERIO, | 329 | .name = SUPERIO, |
330 | .startup = superio_startup_irq, | 330 | .startup = superio_startup_irq, |
331 | .shutdown = superio_disable_irq, | 331 | .shutdown = superio_disable_irq, |
332 | .enable = superio_enable_irq, | 332 | .enable = superio_enable_irq, |