Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108502
b: refs/heads/master
c: fa46d35
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Andi Kleen committed Aug 15, 2008
1 parent 216d6a3 commit 81203d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 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: afd7301ddb762b66bf1831b0820b402e5d2c439d
refs/heads/master: fa46d3526461e8aa7c0fb39cc1b98ac656695a43
11 changes: 3 additions & 8 deletions trunk/drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,23 +563,18 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
*/
static int handle_eject_request(struct dock_station *ds, u32 event)
{
if (!dock_present(ds))
return -ENODEV;

if (dock_in_progress(ds))
return -EBUSY;

/*
* here we need to generate the undock
* event prior to actually doing the undock
* so that the device struct still exists.
* Also, even send the dock event if the
* device is not present anymore
*/
dock_event(ds, event, UNDOCK_EVENT);

if (!dock_present(ds)) {
complete_undock(ds);
return -ENODEV;
}

hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST);
undock(ds);
eject_dock(ds);
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
if (irq < 0)
continue;

if (irq >= ACPI_MAX_IRQS)
if (irq >= ARRAY_SIZE(acpi_irq_penalty))
continue;

if (used)
Expand All @@ -872,10 +872,12 @@ static int __init acpi_irq_penalty_update(char *str, int used)
*/
void acpi_penalize_isa_irq(int irq, int active)
{
if (active)
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
if (active)
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
}
}

/*
Expand Down

0 comments on commit 81203d4

Please sign in to comment.