aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-13 10:00:22 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-13 10:00:22 -0500
commit4de3a8e101150feaefa1139611a50ff37467f33e (patch)
treedaada742542518b02d7db7c5d32e715eaa5f166d /arch/arm/kernel
parent294064f58953f9964e5945424b09c51800330a83 (diff)
parent099469502f62fbe0d7e4f0b83a2f22538367f734 (diff)
Merge branch 'master' into fixes
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/bios32.c34
-rw-r--r--arch/arm/kernel/leds.c21
2 files changed, 26 insertions, 29 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index b530e9116a0c..f58ba3589908 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -316,21 +316,6 @@ pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
316 } 316 }
317} 317}
318 318
319static void __devinit
320pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
321{
322 struct pci_dev *dev = bus->self;
323 int i;
324
325 if (!dev) {
326 /*
327 * Assign root bus resources.
328 */
329 for (i = 0; i < 3; i++)
330 bus->resource[i] = root->resource[i];
331 }
332}
333
334/* 319/*
335 * pcibios_fixup_bus - Called after each bus is probed, 320 * pcibios_fixup_bus - Called after each bus is probed,
336 * but before its children are examined. 321 * but before its children are examined.
@@ -341,8 +326,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
341 struct pci_dev *dev; 326 struct pci_dev *dev;
342 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK; 327 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK;
343 328
344 pbus_assign_bus_resources(bus, root);
345
346 /* 329 /*
347 * Walk the devices on this bus, working out what we can 330 * Walk the devices on this bus, working out what we can
348 * and can't support. 331 * and can't support.
@@ -508,12 +491,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
508 sys->busnr = busnr; 491 sys->busnr = busnr;
509 sys->swizzle = hw->swizzle; 492 sys->swizzle = hw->swizzle;
510 sys->map_irq = hw->map_irq; 493 sys->map_irq = hw->map_irq;
511 sys->resource[0] = &ioport_resource; 494 INIT_LIST_HEAD(&sys->resources);
512 sys->resource[1] = &iomem_resource;
513 495
514 ret = hw->setup(nr, sys); 496 ret = hw->setup(nr, sys);
515 497
516 if (ret > 0) { 498 if (ret > 0) {
499 if (list_empty(&sys->resources)) {
500 pci_add_resource(&sys->resources,
501 &ioport_resource);
502 pci_add_resource(&sys->resources,
503 &iomem_resource);
504 }
505
517 sys->bus = hw->scan(nr, sys); 506 sys->bus = hw->scan(nr, sys);
518 507
519 if (!sys->bus) 508 if (!sys->bus)
@@ -571,6 +560,13 @@ void __init pci_common_init(struct hw_pci *hw)
571 } 560 }
572} 561}
573 562
563#ifndef CONFIG_PCI_HOST_ITE8152
564void pcibios_set_master(struct pci_dev *dev)
565{
566 /* No special bus mastering setup handling */
567}
568#endif
569
574char * __init pcibios_setup(char *str) 570char * __init pcibios_setup(char *str)
575{ 571{
576 if (!strcmp(str, "debug")) { 572 if (!strcmp(str, "debug")) {
diff --git a/arch/arm/kernel/leds.c b/arch/arm/kernel/leds.c
index 0bcd38341573..1911dae19e4f 100644
--- a/arch/arm/kernel/leds.c
+++ b/arch/arm/kernel/leds.c
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/export.h> 10#include <linux/export.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/sysdev.h> 12#include <linux/device.h>
13#include <linux/syscore_ops.h> 13#include <linux/syscore_ops.h>
14#include <linux/string.h> 14#include <linux/string.h>
15 15
@@ -34,8 +34,8 @@ static const struct leds_evt_name evt_names[] = {
34 { "red", led_red_on, led_red_off }, 34 { "red", led_red_on, led_red_off },
35}; 35};
36 36
37static ssize_t leds_store(struct sys_device *dev, 37static ssize_t leds_store(struct device *dev,
38 struct sysdev_attribute *attr, 38 struct device_attribute *attr,
39 const char *buf, size_t size) 39 const char *buf, size_t size)
40{ 40{
41 int ret = -EINVAL, len = strcspn(buf, " "); 41 int ret = -EINVAL, len = strcspn(buf, " ");
@@ -69,15 +69,16 @@ static ssize_t leds_store(struct sys_device *dev,
69 return ret; 69 return ret;
70} 70}
71 71
72static SYSDEV_ATTR(event, 0200, NULL, leds_store); 72static DEVICE_ATTR(event, 0200, NULL, leds_store);
73 73
74static struct sysdev_class leds_sysclass = { 74static struct bus_type leds_subsys = {
75 .name = "leds", 75 .name = "leds",
76 .dev_name = "leds",
76}; 77};
77 78
78static struct sys_device leds_device = { 79static struct device leds_device = {
79 .id = 0, 80 .id = 0,
80 .cls = &leds_sysclass, 81 .bus = &leds_subsys,
81}; 82};
82 83
83static int leds_suspend(void) 84static int leds_suspend(void)
@@ -105,11 +106,11 @@ static struct syscore_ops leds_syscore_ops = {
105static int __init leds_init(void) 106static int __init leds_init(void)
106{ 107{
107 int ret; 108 int ret;
108 ret = sysdev_class_register(&leds_sysclass); 109 ret = subsys_system_register(&leds_subsys, NULL);
109 if (ret == 0) 110 if (ret == 0)
110 ret = sysdev_register(&leds_device); 111 ret = device_register(&leds_device);
111 if (ret == 0) 112 if (ret == 0)
112 ret = sysdev_create_file(&leds_device, &attr_event); 113 ret = device_create_file(&leds_device, &dev_attr_event);
113 if (ret == 0) 114 if (ret == 0)
114 register_syscore_ops(&leds_syscore_ops); 115 register_syscore_ops(&leds_syscore_ops);
115 return ret; 116 return ret;