Commit b4b1a575 authored by Patrick Mochel's avatar Patrick Mochel

Merge bk://kernel.bkbits.net//home/mochel/linux-2.5-power

into osdl.org:/home/mochel/src/kernel/linux-2.5-power
parents bea0f144 2b142116
......@@ -6,7 +6,7 @@ menu "ACPI (Advanced Configuration and Power Interface) Support"
config ACPI_HT
bool "ACPI Processor Enumeration for HT"
depends on MPENTIUM4
depends on X86
default y
---help---
ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT)
......
......@@ -3330,10 +3330,6 @@ static ide_driver_t ide_cdrom_driver = {
.drives = LIST_HEAD_INIT(ide_cdrom_driver.drives),
.start_power_step = ide_cdrom_start_power_step,
.complete_power_step = ide_cdrom_complete_power_step,
.gen_driver = {
.suspend = generic_ide_suspend,
.resume = generic_ide_resume,
}
};
static int idecd_open(struct inode * inode, struct file * file)
......
......@@ -1732,10 +1732,6 @@ static ide_driver_t idedisk_driver = {
.drives = LIST_HEAD_INIT(idedisk_driver.drives),
.start_power_step = idedisk_start_power_step,
.complete_power_step = idedisk_complete_power_step,
.gen_driver = {
.suspend = generic_ide_suspend,
.resume = generic_ide_resume,
}
};
static int idedisk_open(struct inode *inode, struct file *filp)
......
......@@ -1534,16 +1534,13 @@ int ata_attach(ide_drive_t *drive)
EXPORT_SYMBOL(ata_attach);
int generic_ide_suspend(struct device *dev, u32 state, u32 level)
static int generic_ide_suspend(struct device *dev, u32 state)
{
ide_drive_t *drive = dev->driver_data;
struct request rq;
struct request_pm_state rqpm;
ide_task_t args;
if (level == dev->power_state || level != SUSPEND_SAVE_STATE)
return 0;
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
......@@ -1556,18 +1553,13 @@ int generic_ide_suspend(struct device *dev, u32 state, u32 level)
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
EXPORT_SYMBOL(generic_ide_suspend);
int generic_ide_resume(struct device *dev, u32 level)
static int generic_ide_resume(struct device *dev)
{
ide_drive_t *drive = dev->driver_data;
struct request rq;
struct request_pm_state rqpm;
ide_task_t args;
if (level == dev->power_state || level != RESUME_RESTORE_STATE)
return 0;
memset(&rq, 0, sizeof(rq));
memset(&rqpm, 0, sizeof(rqpm));
memset(&args, 0, sizeof(args));
......@@ -1580,8 +1572,6 @@ int generic_ide_resume(struct device *dev, u32 level)
return ide_do_drive_cmd(drive, &rq, ide_head_wait);
}
EXPORT_SYMBOL(generic_ide_resume);
int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
unsigned long arg)
{
......@@ -2594,6 +2584,8 @@ EXPORT_SYMBOL(ide_probe);
struct bus_type ide_bus_type = {
.name = "ide",
.suspend = generic_ide_suspend,
.resume = generic_ide_resume,
};
/*
......
......@@ -160,32 +160,23 @@ static int pci_device_remove(struct device * dev)
return 0;
}
static int pci_device_suspend(struct device * dev, u32 state, u32 level)
static int pci_device_suspend(struct device * dev, u32 state)
{
struct pci_dev * pci_dev = to_pci_dev(dev);
int error = 0;
struct pci_driver * drv = pci_dev->driver;
if (pci_dev->driver) {
if (level == SUSPEND_SAVE_STATE && pci_dev->driver->save_state)
error = pci_dev->driver->save_state(pci_dev,state);
else if (level == SUSPEND_POWER_DOWN && pci_dev->driver->suspend)
error = pci_dev->driver->suspend(pci_dev,state);
}
return error;
if (drv && drv->suspend)
return drv->suspend(pci_dev,state);
return 0;
}
static int pci_device_resume(struct device * dev, u32 level)
static int pci_device_resume(struct device * dev)
{
struct pci_dev * pci_dev = to_pci_dev(dev);
struct pci_driver * drv = pci_dev->driver;
if (pci_dev->driver) {
/* We may not call PCI drivers resume at
RESUME_POWER_ON because interrupts are not yet
working at that point. Calling resume at
RESUME_RESTORE_STATE seems like solution. */
if (level == RESUME_RESTORE_STATE && pci_dev->driver->resume)
pci_dev->driver->resume(pci_dev);
}
if (drv && drv->resume)
drv->resume(pci_dev);
return 0;
}
......@@ -351,8 +342,6 @@ pci_register_driver(struct pci_driver *drv)
drv->driver.name = drv->name;
drv->driver.bus = &pci_bus_type;
drv->driver.probe = pci_device_probe;
drv->driver.resume = pci_device_resume;
drv->driver.suspend = pci_device_suspend;
drv->driver.remove = pci_device_remove;
drv->driver.kobj.ktype = &pci_driver_kobj_type;
pci_init_dynids(&drv->dynids);
......@@ -498,6 +487,8 @@ struct bus_type pci_bus_type = {
.name = "pci",
.match = pci_bus_match,
.hotplug = pci_hotplug,
.suspend = pci_device_suspend,
.resume = pci_device_resume,
};
static int __init pci_driver_init(void)
......
......@@ -1241,8 +1241,6 @@ typedef struct ide_driver_s {
#define DRIVER(drive) ((drive)->driver)
extern int generic_ide_ioctl(struct block_device *, unsigned, unsigned long);
extern int generic_ide_suspend(struct device *dev, u32 state, u32 level);
extern int generic_ide_resume(struct device *dev, u32 level);
/*
* IDE modules.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment