Merge branch 'linus' into test

Conflicts:
	MAINTAINERS
	arch/x86/kernel/acpi/boot.c
	arch/x86/kernel/acpi/sleep.c
	drivers/acpi/Kconfig
	drivers/pnp/Makefile
	drivers/pnp/quirks.c

Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
Len Brown 2008-10-22 23:57:26 -04:00
commit 057316cc6a
7289 changed files with 578807 additions and 188282 deletions

View file

@ -2,8 +2,11 @@
# Makefile for the Linux Plug-and-Play Support.
#
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o system.o
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o
obj-$(CONFIG_PNPACPI) += pnpacpi/
obj-$(CONFIG_PNPBIOS) += pnpbios/
obj-$(CONFIG_ISAPNP) += isapnp/
# pnp_system_init goes after pnpacpi/pnpbios init
obj-y += system.o

View file

@ -4,6 +4,7 @@
*/
extern spinlock_t pnp_lock;
extern struct device_attribute pnp_interface_attrs[];
void *pnp_alloc(long size);
int pnp_register_protocol(struct pnp_protocol *protocol);
@ -16,7 +17,6 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid);
int pnp_add_device(struct pnp_dev *dev);
struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id);
int pnp_interface_attach_device(struct pnp_dev *dev);
int pnp_add_card(struct pnp_card *card);
void pnp_remove_card(struct pnp_card *card);
@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct resource *res);
void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
void pnp_free_resources(struct pnp_dev *dev);
int pnp_resource_type(struct resource *res);
unsigned long pnp_resource_type(struct resource *res);
struct pnp_resource {
struct list_head list;

View file

@ -159,21 +159,13 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid
int __pnp_add_device(struct pnp_dev *dev)
{
int ret;
pnp_fixup_device(dev);
dev->status = PNP_READY;
spin_lock(&pnp_lock);
list_add_tail(&dev->global_list, &pnp_global);
list_add_tail(&dev->protocol_list, &dev->protocol->devices);
spin_unlock(&pnp_lock);
ret = device_register(&dev->dev);
if (ret)
return ret;
pnp_interface_attach_device(dev);
return 0;
return device_register(&dev->dev);
}
/*
@ -216,7 +208,6 @@ void __pnp_remove_device(struct pnp_dev *dev)
static int __init pnp_init(void)
{
printk(KERN_INFO "Linux Plug and Play Support v0.97 (c) Adam Belay\n");
return bus_register(&pnp_bus_type);
}

View file

@ -205,6 +205,7 @@ struct bus_type pnp_bus_type = {
.remove = pnp_device_remove,
.suspend = pnp_bus_suspend,
.resume = pnp_bus_resume,
.dev_attrs = pnp_interface_attrs,
};
int pnp_register_driver(struct pnp_driver *drv)

View file

@ -243,8 +243,6 @@ static ssize_t pnp_show_options(struct device *dmdev,
return ret;
}
static DEVICE_ATTR(options, S_IRUGO, pnp_show_options, NULL);
static ssize_t pnp_show_current_resources(struct device *dmdev,
struct device_attribute *attr,
char *buf)
@ -420,9 +418,6 @@ done:
return count;
}
static DEVICE_ATTR(resources, S_IRUGO | S_IWUSR,
pnp_show_current_resources, pnp_set_current_resources);
static ssize_t pnp_show_current_ids(struct device *dmdev,
struct device_attribute *attr, char *buf)
{
@ -437,27 +432,11 @@ static ssize_t pnp_show_current_ids(struct device *dmdev,
return (str - buf);
}
static DEVICE_ATTR(id, S_IRUGO, pnp_show_current_ids, NULL);
int pnp_interface_attach_device(struct pnp_dev *dev)
{
int rc = device_create_file(&dev->dev, &dev_attr_options);
if (rc)
goto err;
rc = device_create_file(&dev->dev, &dev_attr_resources);
if (rc)
goto err_opt;
rc = device_create_file(&dev->dev, &dev_attr_id);
if (rc)
goto err_res;
return 0;
err_res:
device_remove_file(&dev->dev, &dev_attr_resources);
err_opt:
device_remove_file(&dev->dev, &dev_attr_options);
err:
return rc;
}
struct device_attribute pnp_interface_attrs[] = {
__ATTR(resources, S_IRUGO | S_IWUSR,
pnp_show_current_resources,
pnp_set_current_resources),
__ATTR(options, S_IRUGO, pnp_show_options, NULL),
__ATTR(id, S_IRUGO, pnp_show_current_ids, NULL),
__ATTR_NULL,
};

View file

@ -1012,7 +1012,7 @@ static int __init isapnp_init(void)
printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n");
return 0;
}
#ifdef CONFIG_PPC_MERGE
#ifdef CONFIG_PPC
if (check_legacy_ioport(_PIDXR) || check_legacy_ioport(_PNPWRP))
return -EINVAL;
#endif

View file

@ -272,7 +272,7 @@ static int __init pnpacpi_init(void)
return 0;
}
subsys_initcall(pnpacpi_init);
fs_initcall(pnpacpi_init);
static int __init pnpacpi_setup(char *str)
{

View file

@ -519,7 +519,7 @@ static int __init pnpbios_init(void)
{
int ret;
#if defined(CONFIG_PPC_MERGE)
#if defined(CONFIG_PPC)
if (check_legacy_ioport(PNPBIOS_BASE))
return -ENODEV;
#endif
@ -571,13 +571,13 @@ static int __init pnpbios_init(void)
return 0;
}
subsys_initcall(pnpbios_init);
fs_initcall(pnpbios_init);
static int __init pnpbios_thread_init(void)
{
struct task_struct *task;
#if defined(CONFIG_PPC_MERGE)
#if defined(CONFIG_PPC)
if (check_legacy_ioport(PNPBIOS_BASE))
return 0;
#endif

View file

@ -245,7 +245,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
*/
for_each_pci_dev(pdev) {
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
unsigned int type;
unsigned long type;
type = pci_resource_flags(pdev, i) &
(IORESOURCE_IO | IORESOURCE_MEM);

View file

@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
#endif
}
int pnp_resource_type(struct resource *res)
unsigned long pnp_resource_type(struct resource *res)
{
return res->flags & (IORESOURCE_IO | IORESOURCE_MEM |
IORESOURCE_IRQ | IORESOURCE_DMA);
}
struct resource *pnp_get_resource(struct pnp_dev *dev,
unsigned int type, unsigned int num)
unsigned long type, unsigned int num)
{
struct pnp_resource *pnp_res;
struct resource *res;