mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (53 commits) ACPI: install ACPI table handler before any dynamic tables being loaded ACPI / PM: Blacklist another machine that needs acpi_sleep=nonvs ACPI: Page based coalescing of I/O remappings optimization ACPI: Convert simple locking to RCU based locking ACPI: Pre-map 'system event' related register blocks ACPI: Add interfaces for ioremapping/iounmapping ACPI registers ACPI: Maintain a list of ACPI memory mapped I/O remappings ACPI: Fix ioremap size for MMIO reads and writes ACPI / Battery: Return -ENODEV for unknown values in get_property() ACPI / PM: Fix reference counting of power resources Subject: [PATCH] ACPICA: Fix Scope() op in module level code ACPI battery: support percentage battery remaining capacity ACPI: Make Embedded Controller command timeout delay configurable ACPI dock: move some functions to .init.text ACPI: thermal: remove unused limit code ACPI: static sleep_states[] and acpi_gts_bfs_check ACPI: remove dead code ACPI: delete dedicated MAINTAINERS entries for ACPI EC and BATTERY drivers ACPI: Only processor needs CPU_IDLE ACPICA: Update version to 20101013 ...
This commit is contained in:
commit
474829e875
78 changed files with 2424 additions and 2714 deletions
|
|
@ -12,11 +12,12 @@ void pnp_unregister_protocol(struct pnp_protocol *protocol);
|
|||
|
||||
#define PNP_EISA_ID_MASK 0x7fffffff
|
||||
void pnp_eisa_id_to_string(u32 id, char *str);
|
||||
struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id, char *pnpid);
|
||||
struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id,
|
||||
const char *pnpid);
|
||||
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);
|
||||
struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id);
|
||||
|
||||
int pnp_add_card(struct pnp_card *card);
|
||||
void pnp_remove_card(struct pnp_card *card);
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ static void pnp_release_device(struct device *dmdev)
|
|||
kfree(dev);
|
||||
}
|
||||
|
||||
struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid)
|
||||
struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id,
|
||||
const char *pnpid)
|
||||
{
|
||||
struct pnp_dev *dev;
|
||||
struct pnp_id *dev_id;
|
||||
|
|
@ -194,8 +195,9 @@ int pnp_add_device(struct pnp_dev *dev)
|
|||
for (id = dev->id; id; id = id->next)
|
||||
len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);
|
||||
|
||||
pnp_dbg(&dev->dev, "%s device, IDs%s (%s)\n",
|
||||
dev->protocol->name, buf, dev->active ? "active" : "disabled");
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%s device, IDs%s (%s)\n",
|
||||
dev->protocol->name, buf,
|
||||
dev->active ? "active" : "disabled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ void pnp_unregister_driver(struct pnp_driver *drv)
|
|||
* @dev: pointer to the desired device
|
||||
* @id: pointer to an EISA id string
|
||||
*/
|
||||
struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id)
|
||||
struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)
|
||||
{
|
||||
struct pnp_id *dev_id, *ptr;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "../base.h"
|
||||
#include "pnpacpi.h"
|
||||
|
||||
static int num = 0;
|
||||
static int num;
|
||||
|
||||
/* We need only to blacklist devices that have already an acpi driver that
|
||||
* can't use pnp layer. We don't need to blacklist device that are directly
|
||||
|
|
@ -59,7 +59,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)
|
|||
#define TEST_ALPHA(c) \
|
||||
if (!('@' <= (c) || (c) <= 'Z')) \
|
||||
return 0
|
||||
static int __init ispnpidacpi(char *id)
|
||||
static int __init ispnpidacpi(const char *id)
|
||||
{
|
||||
TEST_ALPHA(id[0]);
|
||||
TEST_ALPHA(id[1]);
|
||||
|
|
@ -180,11 +180,24 @@ struct pnp_protocol pnpacpi_protocol = {
|
|||
};
|
||||
EXPORT_SYMBOL(pnpacpi_protocol);
|
||||
|
||||
static char *pnpacpi_get_id(struct acpi_device *device)
|
||||
{
|
||||
struct acpi_hardware_id *id;
|
||||
|
||||
list_for_each_entry(id, &device->pnp.ids, list) {
|
||||
if (ispnpidacpi(id->id))
|
||||
return id->id;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int __init pnpacpi_add_device(struct acpi_device *device)
|
||||
{
|
||||
acpi_handle temp = NULL;
|
||||
acpi_status status;
|
||||
struct pnp_dev *dev;
|
||||
char *pnpid;
|
||||
struct acpi_hardware_id *id;
|
||||
|
||||
/*
|
||||
|
|
@ -192,11 +205,17 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
|
|||
* driver should not be loaded.
|
||||
*/
|
||||
status = acpi_get_handle(device->handle, "_CRS", &temp);
|
||||
if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) ||
|
||||
is_exclusive_device(device) || (!device->status.present))
|
||||
if (ACPI_FAILURE(status))
|
||||
return 0;
|
||||
|
||||
dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device));
|
||||
pnpid = pnpacpi_get_id(device);
|
||||
if (!pnpid)
|
||||
return 0;
|
||||
|
||||
if (is_exclusive_device(device) || !device->status.present)
|
||||
return 0;
|
||||
|
||||
dev = pnp_alloc_dev(&pnpacpi_protocol, num, pnpid);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -227,7 +246,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
|
|||
pnpacpi_parse_resource_option_data(dev);
|
||||
|
||||
list_for_each_entry(id, &device->pnp.ids, list) {
|
||||
if (!strcmp(id->id, acpi_device_hid(device)))
|
||||
if (!strcmp(id->id, pnpid))
|
||||
continue;
|
||||
if (!ispnpidacpi(id->id))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
|
|||
res->start = irq;
|
||||
res->end = irq;
|
||||
|
||||
pnp_dbg(&dev->dev, " add %pr\n", res);
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
|
||||
return pnp_res;
|
||||
}
|
||||
|
||||
|
|
@ -544,7 +544,7 @@ struct pnp_resource *pnp_add_dma_resource(struct pnp_dev *dev, int dma,
|
|||
res->start = dma;
|
||||
res->end = dma;
|
||||
|
||||
pnp_dbg(&dev->dev, " add %pr\n", res);
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
|
||||
return pnp_res;
|
||||
}
|
||||
|
||||
|
|
@ -568,7 +568,7 @@ struct pnp_resource *pnp_add_io_resource(struct pnp_dev *dev,
|
|||
res->start = start;
|
||||
res->end = end;
|
||||
|
||||
pnp_dbg(&dev->dev, " add %pr\n", res);
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
|
||||
return pnp_res;
|
||||
}
|
||||
|
||||
|
|
@ -592,7 +592,7 @@ struct pnp_resource *pnp_add_mem_resource(struct pnp_dev *dev,
|
|||
res->start = start;
|
||||
res->end = end;
|
||||
|
||||
pnp_dbg(&dev->dev, " add %pr\n", res);
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
|
||||
return pnp_res;
|
||||
}
|
||||
|
||||
|
|
@ -616,7 +616,7 @@ struct pnp_resource *pnp_add_bus_resource(struct pnp_dev *dev,
|
|||
res->start = start;
|
||||
res->end = end;
|
||||
|
||||
pnp_dbg(&dev->dev, " add %pr\n", res);
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
|
||||
return pnp_res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue