Skip to content

Commit

Permalink
[PATCH] CONFIG_PM=n slim: drivers/scsi/sata_sil*
Browse files Browse the repository at this point in the history
Remove some code which is unneeded if CONFIG_PM=n.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alexey Dobriyan authored and Jeff Garzik committed Aug 24, 2006
1 parent 08be09b commit 281d426
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/ata/sata_sil.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ enum {
};

static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
#ifdef CONFIG_PM
static int sil_pci_device_resume(struct pci_dev *pdev);
#endif
static void sil_dev_config(struct ata_port *ap, struct ata_device *dev);
static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg);
static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
Expand Down Expand Up @@ -157,8 +159,10 @@ static struct pci_driver sil_pci_driver = {
.id_table = sil_pci_tbl,
.probe = sil_init_one,
.remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend,
.resume = sil_pci_device_resume,
#endif
};

static struct scsi_host_template sil_sht = {
Expand Down Expand Up @@ -696,6 +700,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
return rc;
}

#ifdef CONFIG_PM
static int sil_pci_device_resume(struct pci_dev *pdev)
{
struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev);
Expand All @@ -707,6 +712,7 @@ static int sil_pci_device_resume(struct pci_dev *pdev)

return 0;
}
#endif

static int __init sil_init(void)
{
Expand Down
6 changes: 6 additions & 0 deletions drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ static int sil24_port_start(struct ata_port *ap);
static void sil24_port_stop(struct ata_port *ap);
static void sil24_host_stop(struct ata_host_set *host_set);
static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
#ifdef CONFIG_PM
static int sil24_pci_device_resume(struct pci_dev *pdev);
#endif

static const struct pci_device_id sil24_pci_tbl[] = {
{ 0x1095, 0x3124, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3124 },
Expand All @@ -355,8 +357,10 @@ static struct pci_driver sil24_pci_driver = {
.id_table = sil24_pci_tbl,
.probe = sil24_init_one,
.remove = ata_pci_remove_one, /* safe? */
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend,
.resume = sil24_pci_device_resume,
#endif
};

static struct scsi_host_template sil24_sht = {
Expand Down Expand Up @@ -1184,6 +1188,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return rc;
}

#ifdef CONFIG_PM
static int sil24_pci_device_resume(struct pci_dev *pdev)
{
struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev);
Expand All @@ -1202,6 +1207,7 @@ static int sil24_pci_device_resume(struct pci_dev *pdev)

return 0;
}
#endif

static int __init sil24_init(void)
{
Expand Down

0 comments on commit 281d426

Please sign in to comment.