Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324264
b: refs/heads/master
c: 8ee5bdf
h: refs/heads/master
v: v3
  • Loading branch information
Jiang Liu authored and Bjorn Helgaas committed Sep 24, 2012
1 parent 48462a4 commit c8c803e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 059e4ba292c69cb400cda92fbd37f25d4eec564b
refs/heads/master: 8ee5bdf3e9c99808bf271aa5cc41d689e6d9d3eb
16 changes: 3 additions & 13 deletions trunk/drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,16 @@ static struct acpi_driver acpi_pci_root_driver = {
};

static LIST_HEAD(acpi_pci_roots);
static LIST_HEAD(acpi_pci_drivers);

static struct acpi_pci_driver *sub_driver;
static DEFINE_MUTEX(osc_lock);

int acpi_pci_register_driver(struct acpi_pci_driver *driver)
{
int n = 0;
struct acpi_pci_root *root;

struct acpi_pci_driver **pptr = &sub_driver;
while (*pptr)
pptr = &(*pptr)->next;
*pptr = driver;
list_add_tail(&driver->node, &acpi_pci_drivers);

if (!driver->add)
return 0;
Expand All @@ -103,14 +100,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
{
struct acpi_pci_root *root;

struct acpi_pci_driver **pptr = &sub_driver;
while (*pptr) {
if (*pptr == driver)
break;
pptr = &(*pptr)->next;
}
BUG_ON(!*pptr);
*pptr = (*pptr)->next;
list_del(&driver->node);

if (!driver->remove)
return;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void acpi_penalize_isa_irq(int irq, int active);
void acpi_pci_irq_disable (struct pci_dev *dev);

struct acpi_pci_driver {
struct acpi_pci_driver *next;
struct list_head node;
int (*add)(acpi_handle handle);
void (*remove)(acpi_handle handle);
};
Expand Down

0 comments on commit c8c803e

Please sign in to comment.