Commit fbd5c06b authored by Patrick Mochel's avatar Patrick Mochel Committed by Greg Kroah-Hartman

[PATCH] Remove ->save_state() in sc1200.c

This removes the uncalled and unneeded method struct
pci_driver::save_state(). The contents of ->save_state() were folded into
->suspend(), though the semantics don't seem exactly right - the hwifs
should not be iterated over there; the driver core should take care of
that. But, that code will never get executed as is, since neither function
should ever be called with (state == 0).
parent f612d35e
...@@ -396,13 +396,16 @@ typedef struct sc1200_saved_state_s { ...@@ -396,13 +396,16 @@ typedef struct sc1200_saved_state_s {
__u32 regs[4]; __u32 regs[4];
} sc1200_saved_state_t; } sc1200_saved_state_t;
static int sc1200_save_state (struct pci_dev *dev, u32 state)
static int sc1200_suspend (struct pci_dev *dev, u32 state)
{ {
ide_hwif_t *hwif = NULL; ide_hwif_t *hwif = NULL;
printk("SC1200: save_state(%u)\n", state); printk("SC1200: suspend(%u)\n", state);
if (state != 0)
return 0; // we only save state when going from full power to less if (state == 0) {
// we only save state when going from full power to less
// //
// Loop over all interfaces that are part of this PCI device: // Loop over all interfaces that are part of this PCI device:
// //
...@@ -421,19 +424,16 @@ printk("SC1200: save_state(%u)\n", state); ...@@ -421,19 +424,16 @@ printk("SC1200: save_state(%u)\n", state);
} }
ss = (sc1200_saved_state_t *)hwif->config_data; ss = (sc1200_saved_state_t *)hwif->config_data;
// //
// Save timing registers: this may be unnecessary if BIOS also does it // Save timing registers: this may be unnecessary if
// BIOS also does it
// //
basereg = hwif->channel ? 0x50 : 0x40; basereg = hwif->channel ? 0x50 : 0x40;
for (r = 0; r < 4; ++r) { for (r = 0; r < 4; ++r) {
pci_read_config_dword (hwif->pci_dev, basereg + (r<<2), &ss->regs[r]); pci_read_config_dword (hwif->pci_dev, basereg + (r<<2), &ss->regs[r]);
} }
} }
return 0; }
}
static int sc1200_suspend (struct pci_dev *dev, u32 state)
{
printk("SC1200: suspend(%u)\n", state);
/* You don't need to iterate over disks -- sysfs should have done that for you already */ /* You don't need to iterate over disks -- sysfs should have done that for you already */
pci_disable_device(dev); pci_disable_device(dev);
...@@ -572,7 +572,6 @@ static struct pci_driver driver = { ...@@ -572,7 +572,6 @@ static struct pci_driver driver = {
.name = "SC1200 IDE", .name = "SC1200 IDE",
.id_table = sc1200_pci_tbl, .id_table = sc1200_pci_tbl,
.probe = sc1200_init_one, .probe = sc1200_init_one,
.save_state = sc1200_save_state,
.suspend = sc1200_suspend, .suspend = sc1200_suspend,
.resume = sc1200_resume, .resume = sc1200_resume,
}; };
......
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