diff options
79 files changed, 510 insertions, 959 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 1564e0927c21..243ee85e4d2e 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
| @@ -39,6 +39,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type) | |||
| 39 | } | 39 | } |
| 40 | return -ENODEV; | 40 | return -ENODEV; |
| 41 | } | 41 | } |
| 42 | EXPORT_SYMBOL_GPL(register_acpi_bus_type); | ||
| 42 | 43 | ||
| 43 | int unregister_acpi_bus_type(struct acpi_bus_type *type) | 44 | int unregister_acpi_bus_type(struct acpi_bus_type *type) |
| 44 | { | 45 | { |
| @@ -54,6 +55,7 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type) | |||
| 54 | } | 55 | } |
| 55 | return -ENODEV; | 56 | return -ENODEV; |
| 56 | } | 57 | } |
| 58 | EXPORT_SYMBOL_GPL(unregister_acpi_bus_type); | ||
| 57 | 59 | ||
| 58 | static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) | 60 | static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) |
| 59 | { | 61 | { |
| @@ -69,7 +71,6 @@ static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) | |||
| 69 | up_read(&bus_type_sem); | 71 | up_read(&bus_type_sem); |
| 70 | return ret; | 72 | return ret; |
| 71 | } | 73 | } |
| 72 | EXPORT_SYMBOL_GPL(register_acpi_bus_type); | ||
| 73 | 74 | ||
| 74 | static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) | 75 | static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) |
| 75 | { | 76 | { |
| @@ -86,7 +87,6 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) | |||
| 86 | up_read(&bus_type_sem); | 87 | up_read(&bus_type_sem); |
| 87 | return ret; | 88 | return ret; |
| 88 | } | 89 | } |
| 89 | EXPORT_SYMBOL_GPL(unregister_acpi_bus_type); | ||
| 90 | 90 | ||
| 91 | /* Get device's handler per its address under its parent */ | 91 | /* Get device's handler per its address under its parent */ |
| 92 | struct acpi_find_child { | 92 | struct acpi_find_child { |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 894d45c6bc67..215ecd097408 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
| @@ -392,6 +392,7 @@ void acpi_power_resource_unregister_device(struct device *dev, acpi_handle handl | |||
| 392 | __acpi_power_resource_unregister_device(dev, | 392 | __acpi_power_resource_unregister_device(dev, |
| 393 | list->handles[i]); | 393 | list->handles[i]); |
| 394 | } | 394 | } |
| 395 | EXPORT_SYMBOL_GPL(acpi_power_resource_unregister_device); | ||
| 395 | 396 | ||
| 396 | static int __acpi_power_resource_register_device( | 397 | static int __acpi_power_resource_register_device( |
| 397 | struct acpi_power_managed_device *powered_device, acpi_handle handle) | 398 | struct acpi_power_managed_device *powered_device, acpi_handle handle) |
| @@ -462,6 +463,7 @@ no_power_resource: | |||
| 462 | printk(KERN_WARNING PREFIX "Invalid Power Resource to register!"); | 463 | printk(KERN_WARNING PREFIX "Invalid Power Resource to register!"); |
| 463 | return -ENODEV; | 464 | return -ENODEV; |
| 464 | } | 465 | } |
| 466 | EXPORT_SYMBOL_GPL(acpi_power_resource_register_device); | ||
| 465 | 467 | ||
| 466 | /** | 468 | /** |
| 467 | * acpi_device_sleep_wake - execute _DSW (Device Sleep Wake) or (deprecated in | 469 | * acpi_device_sleep_wake - execute _DSW (Device Sleep Wake) or (deprecated in |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 1cc02ca2af2a..028dd425702c 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
| @@ -809,6 +809,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in) | |||
| 809 | } | 809 | } |
| 810 | return d_max; | 810 | return d_max; |
| 811 | } | 811 | } |
| 812 | EXPORT_SYMBOL(acpi_pm_device_sleep_state); | ||
| 812 | #endif /* CONFIG_PM */ | 813 | #endif /* CONFIG_PM */ |
| 813 | 814 | ||
| 814 | #ifdef CONFIG_PM_SLEEP | 815 | #ifdef CONFIG_PM_SLEEP |
| @@ -845,6 +846,7 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable) | |||
| 845 | 846 | ||
| 846 | return 0; | 847 | return 0; |
| 847 | } | 848 | } |
| 849 | EXPORT_SYMBOL(acpi_pm_device_run_wake); | ||
| 848 | 850 | ||
| 849 | /** | 851 | /** |
| 850 | * acpi_pm_device_sleep_wake - enable or disable the system wake-up | 852 | * acpi_pm_device_sleep_wake - enable or disable the system wake-up |
diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 3bc8c79bf2c7..4e94ba29cb8d 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c | |||
| @@ -503,21 +503,10 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id | |||
| 503 | &acard_ahci_sht); | 503 | &acard_ahci_sht); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | static int __init acard_ahci_init(void) | 506 | module_pci_driver(acard_ahci_pci_driver); |
| 507 | { | ||
| 508 | return pci_register_driver(&acard_ahci_pci_driver); | ||
| 509 | } | ||
| 510 | |||
| 511 | static void __exit acard_ahci_exit(void) | ||
| 512 | { | ||
| 513 | pci_unregister_driver(&acard_ahci_pci_driver); | ||
| 514 | } | ||
| 515 | 507 | ||
| 516 | MODULE_AUTHOR("Jeff Garzik"); | 508 | MODULE_AUTHOR("Jeff Garzik"); |
| 517 | MODULE_DESCRIPTION("ACard AHCI SATA low-level driver"); | 509 | MODULE_DESCRIPTION("ACard AHCI SATA low-level driver"); |
| 518 | MODULE_LICENSE("GPL"); | 510 | MODULE_LICENSE("GPL"); |
| 519 | MODULE_DEVICE_TABLE(pci, acard_ahci_pci_tbl); | 511 | MODULE_DEVICE_TABLE(pci, acard_ahci_pci_tbl); |
| 520 | MODULE_VERSION(DRV_VERSION); | 512 | MODULE_VERSION(DRV_VERSION); |
| 521 | |||
| 522 | module_init(acard_ahci_init); | ||
| 523 | module_exit(acard_ahci_exit); | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index ebaf67e4b2bc..062e6a1a248f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -105,31 +105,27 @@ static struct ata_port_operations ahci_p5wdh_ops = { | |||
| 105 | 105 | ||
| 106 | static const struct ata_port_info ahci_port_info[] = { | 106 | static const struct ata_port_info ahci_port_info[] = { |
| 107 | /* by features */ | 107 | /* by features */ |
| 108 | [board_ahci] = | 108 | [board_ahci] = { |
| 109 | { | ||
| 110 | .flags = AHCI_FLAG_COMMON, | 109 | .flags = AHCI_FLAG_COMMON, |
| 111 | .pio_mask = ATA_PIO4, | 110 | .pio_mask = ATA_PIO4, |
| 112 | .udma_mask = ATA_UDMA6, | 111 | .udma_mask = ATA_UDMA6, |
| 113 | .port_ops = &ahci_ops, | 112 | .port_ops = &ahci_ops, |
| 114 | }, | 113 | }, |
| 115 | [board_ahci_ign_iferr] = | 114 | [board_ahci_ign_iferr] = { |
| 116 | { | ||
| 117 | AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), | 115 | AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), |
| 118 | .flags = AHCI_FLAG_COMMON, | 116 | .flags = AHCI_FLAG_COMMON, |
| 119 | .pio_mask = ATA_PIO4, | 117 | .pio_mask = ATA_PIO4, |
| 120 | .udma_mask = ATA_UDMA6, | 118 | .udma_mask = ATA_UDMA6, |
| 121 | .port_ops = &ahci_ops, | 119 | .port_ops = &ahci_ops, |
| 122 | }, | 120 | }, |
| 123 | [board_ahci_nosntf] = | 121 | [board_ahci_nosntf] = { |
| 124 | { | ||
| 125 | AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), | 122 | AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), |
| 126 | .flags = AHCI_FLAG_COMMON, | 123 | .flags = AHCI_FLAG_COMMON, |
| 127 | .pio_mask = ATA_PIO4, | 124 | .pio_mask = ATA_PIO4, |
| 128 | .udma_mask = ATA_UDMA6, | 125 | .udma_mask = ATA_UDMA6, |
| 129 | .port_ops = &ahci_ops, | 126 | .port_ops = &ahci_ops, |
| 130 | }, | 127 | }, |
| 131 | [board_ahci_yes_fbs] = | 128 | [board_ahci_yes_fbs] = { |
| 132 | { | ||
| 133 | AHCI_HFLAGS (AHCI_HFLAG_YES_FBS), | 129 | AHCI_HFLAGS (AHCI_HFLAG_YES_FBS), |
| 134 | .flags = AHCI_FLAG_COMMON, | 130 | .flags = AHCI_FLAG_COMMON, |
| 135 | .pio_mask = ATA_PIO4, | 131 | .pio_mask = ATA_PIO4, |
| @@ -137,8 +133,7 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 137 | .port_ops = &ahci_ops, | 133 | .port_ops = &ahci_ops, |
| 138 | }, | 134 | }, |
| 139 | /* by chipsets */ | 135 | /* by chipsets */ |
| 140 | [board_ahci_mcp65] = | 136 | [board_ahci_mcp65] = { |
| 141 | { | ||
| 142 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP | | 137 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP | |
| 143 | AHCI_HFLAG_YES_NCQ), | 138 | AHCI_HFLAG_YES_NCQ), |
| 144 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM, | 139 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM, |
| @@ -146,24 +141,21 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 146 | .udma_mask = ATA_UDMA6, | 141 | .udma_mask = ATA_UDMA6, |
| 147 | .port_ops = &ahci_ops, | 142 | .port_ops = &ahci_ops, |
| 148 | }, | 143 | }, |
| 149 | [board_ahci_mcp77] = | 144 | [board_ahci_mcp77] = { |
| 150 | { | ||
| 151 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP), | 145 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP), |
| 152 | .flags = AHCI_FLAG_COMMON, | 146 | .flags = AHCI_FLAG_COMMON, |
| 153 | .pio_mask = ATA_PIO4, | 147 | .pio_mask = ATA_PIO4, |
| 154 | .udma_mask = ATA_UDMA6, | 148 | .udma_mask = ATA_UDMA6, |
| 155 | .port_ops = &ahci_ops, | 149 | .port_ops = &ahci_ops, |
| 156 | }, | 150 | }, |
| 157 | [board_ahci_mcp89] = | 151 | [board_ahci_mcp89] = { |
| 158 | { | ||
| 159 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA), | 152 | AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA), |
| 160 | .flags = AHCI_FLAG_COMMON, | 153 | .flags = AHCI_FLAG_COMMON, |
| 161 | .pio_mask = ATA_PIO4, | 154 | .pio_mask = ATA_PIO4, |
| 162 | .udma_mask = ATA_UDMA6, | 155 | .udma_mask = ATA_UDMA6, |
| 163 | .port_ops = &ahci_ops, | 156 | .port_ops = &ahci_ops, |
| 164 | }, | 157 | }, |
| 165 | [board_ahci_mv] = | 158 | [board_ahci_mv] = { |
| 166 | { | ||
| 167 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | | 159 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | |
| 168 | AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), | 160 | AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), |
| 169 | .flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA, | 161 | .flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA, |
| @@ -171,8 +163,7 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 171 | .udma_mask = ATA_UDMA6, | 163 | .udma_mask = ATA_UDMA6, |
| 172 | .port_ops = &ahci_ops, | 164 | .port_ops = &ahci_ops, |
| 173 | }, | 165 | }, |
| 174 | [board_ahci_sb600] = | 166 | [board_ahci_sb600] = { |
| 175 | { | ||
| 176 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | | 167 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | |
| 177 | AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255 | | 168 | AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255 | |
| 178 | AHCI_HFLAG_32BIT_ONLY), | 169 | AHCI_HFLAG_32BIT_ONLY), |
| @@ -181,16 +172,14 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 181 | .udma_mask = ATA_UDMA6, | 172 | .udma_mask = ATA_UDMA6, |
| 182 | .port_ops = &ahci_pmp_retry_srst_ops, | 173 | .port_ops = &ahci_pmp_retry_srst_ops, |
| 183 | }, | 174 | }, |
| 184 | [board_ahci_sb700] = /* for SB700 and SB800 */ | 175 | [board_ahci_sb700] = { /* for SB700 and SB800 */ |
| 185 | { | ||
| 186 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), | 176 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), |
| 187 | .flags = AHCI_FLAG_COMMON, | 177 | .flags = AHCI_FLAG_COMMON, |
| 188 | .pio_mask = ATA_PIO4, | 178 | .pio_mask = ATA_PIO4, |
| 189 | .udma_mask = ATA_UDMA6, | 179 | .udma_mask = ATA_UDMA6, |
| 190 | .port_ops = &ahci_pmp_retry_srst_ops, | 180 | .port_ops = &ahci_pmp_retry_srst_ops, |
| 191 | }, | 181 | }, |
| 192 | [board_ahci_vt8251] = | 182 | [board_ahci_vt8251] = { |
| 193 | { | ||
| 194 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP), | 183 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP), |
| 195 | .flags = AHCI_FLAG_COMMON, | 184 | .flags = AHCI_FLAG_COMMON, |
| 196 | .pio_mask = ATA_PIO4, | 185 | .pio_mask = ATA_PIO4, |
| @@ -777,6 +766,22 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev) | |||
| 777 | }, | 766 | }, |
| 778 | }, | 767 | }, |
| 779 | /* | 768 | /* |
| 769 | * All BIOS versions for the MSI K9AGM2 (MS-7327) support | ||
| 770 | * 64bit DMA. | ||
| 771 | * | ||
| 772 | * This board also had the typo mentioned above in the | ||
| 773 | * Manufacturer DMI field (fixed in BIOS version 1.5), so | ||
| 774 | * match on DMI_BOARD_VENDOR of "MICRO-STAR INTER" again. | ||
| 775 | */ | ||
| 776 | { | ||
| 777 | .ident = "MSI K9AGM2", | ||
| 778 | .matches = { | ||
| 779 | DMI_MATCH(DMI_BOARD_VENDOR, | ||
| 780 | "MICRO-STAR INTER"), | ||
| 781 | DMI_MATCH(DMI_BOARD_NAME, "MS-7327"), | ||
| 782 | }, | ||
| 783 | }, | ||
| 784 | /* | ||
| 780 | * All BIOS versions for the Asus M3A support 64bit DMA. | 785 | * All BIOS versions for the Asus M3A support 64bit DMA. |
| 781 | * (all release versions from 0301 to 1206 were tested) | 786 | * (all release versions from 0301 to 1206 were tested) |
| 782 | */ | 787 | */ |
| @@ -1233,22 +1238,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1233 | &ahci_sht); | 1238 | &ahci_sht); |
| 1234 | } | 1239 | } |
| 1235 | 1240 | ||
| 1236 | static int __init ahci_init(void) | 1241 | module_pci_driver(ahci_pci_driver); |
| 1237 | { | ||
| 1238 | return pci_register_driver(&ahci_pci_driver); | ||
| 1239 | } | ||
| 1240 | |||
| 1241 | static void __exit ahci_exit(void) | ||
| 1242 | { | ||
| 1243 | pci_unregister_driver(&ahci_pci_driver); | ||
| 1244 | } | ||
| 1245 | |||
| 1246 | 1242 | ||
| 1247 | MODULE_AUTHOR("Jeff Garzik"); | 1243 | MODULE_AUTHOR("Jeff Garzik"); |
| 1248 | MODULE_DESCRIPTION("AHCI SATA low-level driver"); | 1244 | MODULE_DESCRIPTION("AHCI SATA low-level driver"); |
| 1249 | MODULE_LICENSE("GPL"); | 1245 | MODULE_LICENSE("GPL"); |
| 1250 | MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); | 1246 | MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); |
| 1251 | MODULE_VERSION(DRV_VERSION); | 1247 | MODULE_VERSION(DRV_VERSION); |
| 1252 | |||
| 1253 | module_init(ahci_init); | ||
| 1254 | module_exit(ahci_exit); | ||
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 9e419e1c2006..09728e09cb31 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/gfp.h> | 16 | #include <linux/gfp.h> |
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/pm.h> | ||
| 18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
| 20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
| @@ -271,13 +272,10 @@ static int ahci_resume(struct device *dev) | |||
| 271 | 272 | ||
| 272 | return 0; | 273 | return 0; |
| 273 | } | 274 | } |
| 274 | |||
| 275 | static struct dev_pm_ops ahci_pm_ops = { | ||
| 276 | .suspend = &ahci_suspend, | ||
| 277 | .resume = &ahci_resume, | ||
| 278 | }; | ||
| 279 | #endif | 275 | #endif |
| 280 | 276 | ||
| 277 | SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume); | ||
| 278 | |||
| 281 | static const struct of_device_id ahci_of_match[] = { | 279 | static const struct of_device_id ahci_of_match[] = { |
| 282 | { .compatible = "calxeda,hb-ahci", }, | 280 | { .compatible = "calxeda,hb-ahci", }, |
| 283 | { .compatible = "snps,spear-ahci", }, | 281 | { .compatible = "snps,spear-ahci", }, |
| @@ -291,9 +289,7 @@ static struct platform_driver ahci_driver = { | |||
| 291 | .name = "ahci", | 289 | .name = "ahci", |
| 292 | .owner = THIS_MODULE, | 290 | .owner = THIS_MODULE, |
| 293 | .of_match_table = ahci_of_match, | 291 | .of_match_table = ahci_of_match, |
| 294 | #ifdef CONFIG_PM | ||
| 295 | .pm = &ahci_pm_ops, | 292 | .pm = &ahci_pm_ops, |
| 296 | #endif | ||
| 297 | }, | 293 | }, |
| 298 | .id_table = ahci_devtype, | 294 | .id_table = ahci_devtype, |
| 299 | }; | 295 | }; |
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index aae115600b74..f8f38a08abc5 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c | |||
| @@ -255,17 +255,7 @@ static struct pci_driver ata_generic_pci_driver = { | |||
| 255 | #endif | 255 | #endif |
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | static int __init ata_generic_init(void) | 258 | module_pci_driver(ata_generic_pci_driver); |
| 259 | { | ||
| 260 | return pci_register_driver(&ata_generic_pci_driver); | ||
| 261 | } | ||
| 262 | |||
| 263 | |||
| 264 | static void __exit ata_generic_exit(void) | ||
| 265 | { | ||
| 266 | pci_unregister_driver(&ata_generic_pci_driver); | ||
| 267 | } | ||
| 268 | |||
| 269 | 259 | ||
| 270 | MODULE_AUTHOR("Alan Cox"); | 260 | MODULE_AUTHOR("Alan Cox"); |
| 271 | MODULE_DESCRIPTION("low-level driver for generic ATA"); | 261 | MODULE_DESCRIPTION("low-level driver for generic ATA"); |
| @@ -273,7 +263,4 @@ MODULE_LICENSE("GPL"); | |||
| 273 | MODULE_DEVICE_TABLE(pci, ata_generic); | 263 | MODULE_DEVICE_TABLE(pci, ata_generic); |
| 274 | MODULE_VERSION(DRV_VERSION); | 264 | MODULE_VERSION(DRV_VERSION); |
| 275 | 265 | ||
| 276 | module_init(ata_generic_init); | ||
| 277 | module_exit(ata_generic_exit); | ||
| 278 | |||
| 279 | module_param(all_generic_ide, int, 0); | 266 | module_param(all_generic_ide, int, 0); |
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index bb7c5f1085cc..902b5a457170 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/libata.h> | 16 | #include <linux/libata.h> |
| 17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
| 18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
| 19 | #include <linux/pm_runtime.h> | ||
| 19 | #include <scsi/scsi_device.h> | 20 | #include <scsi/scsi_device.h> |
| 20 | #include "libata.h" | 21 | #include "libata.h" |
| 21 | 22 | ||
| @@ -48,62 +49,53 @@ static void ata_acpi_clear_gtf(struct ata_device *dev) | |||
| 48 | } | 49 | } |
| 49 | 50 | ||
| 50 | /** | 51 | /** |
| 51 | * ata_acpi_associate_sata_port - associate SATA port with ACPI objects | 52 | * ata_ap_acpi_handle - provide the acpi_handle for an ata_port |
| 52 | * @ap: target SATA port | 53 | * @ap: the acpi_handle returned will correspond to this port |
| 53 | * | 54 | * |
| 54 | * Look up ACPI objects associated with @ap and initialize acpi_handle | 55 | * Returns the acpi_handle for the ACPI namespace object corresponding to |
| 55 | * fields of @ap, the port and devices accordingly. | 56 | * the ata_port passed into the function, or NULL if no such object exists |
| 56 | * | ||
| 57 | * LOCKING: | ||
| 58 | * EH context. | ||
| 59 | * | ||
| 60 | * RETURNS: | ||
| 61 | * 0 on success, -errno on failure. | ||
| 62 | */ | 57 | */ |
| 63 | void ata_acpi_associate_sata_port(struct ata_port *ap) | 58 | acpi_handle ata_ap_acpi_handle(struct ata_port *ap) |
| 64 | { | 59 | { |
| 65 | WARN_ON(!(ap->flags & ATA_FLAG_ACPI_SATA)); | 60 | if (ap->flags & ATA_FLAG_ACPI_SATA) |
| 66 | 61 | return NULL; | |
| 67 | if (!sata_pmp_attached(ap)) { | ||
| 68 | u64 adr = SATA_ADR(ap->port_no, NO_PORT_MULT); | ||
| 69 | |||
| 70 | ap->link.device->acpi_handle = | ||
| 71 | acpi_get_child(ap->host->acpi_handle, adr); | ||
| 72 | } else { | ||
| 73 | struct ata_link *link; | ||
| 74 | |||
| 75 | ap->link.device->acpi_handle = NULL; | ||
| 76 | |||
| 77 | ata_for_each_link(link, ap, EDGE) { | ||
| 78 | u64 adr = SATA_ADR(ap->port_no, link->pmp); | ||
| 79 | 62 | ||
| 80 | link->device->acpi_handle = | 63 | /* |
| 81 | acpi_get_child(ap->host->acpi_handle, adr); | 64 | * If acpi bind operation has already happened, we can get the handle |
| 82 | } | 65 | * for the port by checking the corresponding scsi_host device's |
| 83 | } | 66 | * firmware node, otherwise we will need to find out the handle from |
| 67 | * its parent's acpi node. | ||
| 68 | */ | ||
| 69 | if (ap->scsi_host) | ||
| 70 | return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev); | ||
| 71 | else | ||
| 72 | return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), | ||
| 73 | ap->port_no); | ||
| 84 | } | 74 | } |
| 75 | EXPORT_SYMBOL(ata_ap_acpi_handle); | ||
| 85 | 76 | ||
| 86 | static void ata_acpi_associate_ide_port(struct ata_port *ap) | 77 | /** |
| 78 | * ata_dev_acpi_handle - provide the acpi_handle for an ata_device | ||
| 79 | * @dev: the acpi_device returned will correspond to this port | ||
| 80 | * | ||
| 81 | * Returns the acpi_handle for the ACPI namespace object corresponding to | ||
| 82 | * the ata_device passed into the function, or NULL if no such object exists | ||
| 83 | */ | ||
| 84 | acpi_handle ata_dev_acpi_handle(struct ata_device *dev) | ||
| 87 | { | 85 | { |
| 88 | int max_devices, i; | 86 | acpi_integer adr; |
| 89 | 87 | struct ata_port *ap = dev->link->ap; | |
| 90 | ap->acpi_handle = acpi_get_child(ap->host->acpi_handle, ap->port_no); | ||
| 91 | if (!ap->acpi_handle) | ||
| 92 | return; | ||
| 93 | |||
| 94 | max_devices = 1; | ||
| 95 | if (ap->flags & ATA_FLAG_SLAVE_POSS) | ||
| 96 | max_devices++; | ||
| 97 | |||
| 98 | for (i = 0; i < max_devices; i++) { | ||
| 99 | struct ata_device *dev = &ap->link.device[i]; | ||
| 100 | |||
| 101 | dev->acpi_handle = acpi_get_child(ap->acpi_handle, i); | ||
| 102 | } | ||
| 103 | 88 | ||
| 104 | if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0) | 89 | if (ap->flags & ATA_FLAG_ACPI_SATA) { |
| 105 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; | 90 | if (!sata_pmp_attached(ap)) |
| 91 | adr = SATA_ADR(ap->port_no, NO_PORT_MULT); | ||
| 92 | else | ||
| 93 | adr = SATA_ADR(ap->port_no, dev->link->pmp); | ||
| 94 | return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), adr); | ||
| 95 | } else | ||
| 96 | return acpi_get_child(ata_ap_acpi_handle(ap), dev->devno); | ||
| 106 | } | 97 | } |
| 98 | EXPORT_SYMBOL(ata_dev_acpi_handle); | ||
| 107 | 99 | ||
| 108 | /* @ap and @dev are the same as ata_acpi_handle_hotplug() */ | 100 | /* @ap and @dev are the same as ata_acpi_handle_hotplug() */ |
| 109 | static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev) | 101 | static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev) |
| @@ -229,56 +221,6 @@ static const struct acpi_dock_ops ata_acpi_ap_dock_ops = { | |||
| 229 | }; | 221 | }; |
| 230 | 222 | ||
| 231 | /** | 223 | /** |
| 232 | * ata_acpi_associate - associate ATA host with ACPI objects | ||
| 233 | * @host: target ATA host | ||
| 234 | * | ||
| 235 | * Look up ACPI objects associated with @host and initialize | ||
| 236 | * acpi_handle fields of @host, its ports and devices accordingly. | ||
| 237 | * | ||
| 238 | * LOCKING: | ||
| 239 | * EH context. | ||
| 240 | * | ||
| 241 | * RETURNS: | ||
| 242 | * 0 on success, -errno on failure. | ||
| 243 | */ | ||
| 244 | void ata_acpi_associate(struct ata_host *host) | ||
| 245 | { | ||
| 246 | int i, j; | ||
| 247 | |||
| 248 | if (!is_pci_dev(host->dev) || libata_noacpi) | ||
| 249 | return; | ||
| 250 | |||
| 251 | host->acpi_handle = DEVICE_ACPI_HANDLE(host->dev); | ||
| 252 | if (!host->acpi_handle) | ||
| 253 | return; | ||
| 254 | |||
| 255 | for (i = 0; i < host->n_ports; i++) { | ||
| 256 | struct ata_port *ap = host->ports[i]; | ||
| 257 | |||
| 258 | if (host->ports[0]->flags & ATA_FLAG_ACPI_SATA) | ||
| 259 | ata_acpi_associate_sata_port(ap); | ||
| 260 | else | ||
| 261 | ata_acpi_associate_ide_port(ap); | ||
| 262 | |||
| 263 | if (ap->acpi_handle) { | ||
| 264 | /* we might be on a docking station */ | ||
| 265 | register_hotplug_dock_device(ap->acpi_handle, | ||
| 266 | &ata_acpi_ap_dock_ops, ap); | ||
| 267 | } | ||
| 268 | |||
| 269 | for (j = 0; j < ata_link_max_devices(&ap->link); j++) { | ||
| 270 | struct ata_device *dev = &ap->link.device[j]; | ||
| 271 | |||
| 272 | if (dev->acpi_handle) { | ||
| 273 | /* we might be on a docking station */ | ||
| 274 | register_hotplug_dock_device(dev->acpi_handle, | ||
| 275 | &ata_acpi_dev_dock_ops, dev); | ||
| 276 | } | ||
| 277 | } | ||
| 278 | } | ||
| 279 | } | ||
| 280 | |||
| 281 | /** | ||
| 282 | * ata_acpi_dissociate - dissociate ATA host from ACPI objects | 224 | * ata_acpi_dissociate - dissociate ATA host from ACPI objects |
| 283 | * @host: target ATA host | 225 | * @host: target ATA host |
| 284 | * | 226 | * |
| @@ -299,7 +241,7 @@ void ata_acpi_dissociate(struct ata_host *host) | |||
| 299 | struct ata_port *ap = host->ports[i]; | 241 | struct ata_port *ap = host->ports[i]; |
| 300 | const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap); | 242 | const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap); |
| 301 | 243 | ||
| 302 | if (ap->acpi_handle && gtm) | 244 | if (ata_ap_acpi_handle(ap) && gtm) |
| 303 | ata_acpi_stm(ap, gtm); | 245 | ata_acpi_stm(ap, gtm); |
| 304 | } | 246 | } |
| 305 | } | 247 | } |
| @@ -324,7 +266,8 @@ int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *gtm) | |||
| 324 | acpi_status status; | 266 | acpi_status status; |
| 325 | int rc = 0; | 267 | int rc = 0; |
| 326 | 268 | ||
| 327 | status = acpi_evaluate_object(ap->acpi_handle, "_GTM", NULL, &output); | 269 | status = acpi_evaluate_object(ata_ap_acpi_handle(ap), "_GTM", NULL, |
| 270 | &output); | ||
| 328 | 271 | ||
| 329 | rc = -ENOENT; | 272 | rc = -ENOENT; |
| 330 | if (status == AE_NOT_FOUND) | 273 | if (status == AE_NOT_FOUND) |
| @@ -394,7 +337,8 @@ int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm) | |||
| 394 | input.count = 3; | 337 | input.count = 3; |
| 395 | input.pointer = in_params; | 338 | input.pointer = in_params; |
| 396 | 339 | ||
| 397 | status = acpi_evaluate_object(ap->acpi_handle, "_STM", &input, NULL); | 340 | status = acpi_evaluate_object(ata_ap_acpi_handle(ap), "_STM", &input, |
| 341 | NULL); | ||
| 398 | 342 | ||
| 399 | if (status == AE_NOT_FOUND) | 343 | if (status == AE_NOT_FOUND) |
| 400 | return -ENOENT; | 344 | return -ENOENT; |
| @@ -451,7 +395,8 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) | |||
| 451 | __func__, ap->port_no); | 395 | __func__, ap->port_no); |
| 452 | 396 | ||
| 453 | /* _GTF has no input parameters */ | 397 | /* _GTF has no input parameters */ |
| 454 | status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output); | 398 | status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_GTF", NULL, |
| 399 | &output); | ||
| 455 | out_obj = dev->gtf_cache = output.pointer; | 400 | out_obj = dev->gtf_cache = output.pointer; |
| 456 | 401 | ||
| 457 | if (ACPI_FAILURE(status)) { | 402 | if (ACPI_FAILURE(status)) { |
| @@ -817,7 +762,8 @@ static int ata_acpi_push_id(struct ata_device *dev) | |||
| 817 | 762 | ||
| 818 | /* It's OK for _SDD to be missing too. */ | 763 | /* It's OK for _SDD to be missing too. */ |
| 819 | swap_buf_le16(dev->id, ATA_ID_WORDS); | 764 | swap_buf_le16(dev->id, ATA_ID_WORDS); |
| 820 | status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL); | 765 | status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_SDD", &input, |
| 766 | NULL); | ||
| 821 | swap_buf_le16(dev->id, ATA_ID_WORDS); | 767 | swap_buf_le16(dev->id, ATA_ID_WORDS); |
| 822 | 768 | ||
| 823 | if (status == AE_NOT_FOUND) | 769 | if (status == AE_NOT_FOUND) |
| @@ -867,7 +813,7 @@ void ata_acpi_on_resume(struct ata_port *ap) | |||
| 867 | const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap); | 813 | const struct ata_acpi_gtm *gtm = ata_acpi_init_gtm(ap); |
| 868 | struct ata_device *dev; | 814 | struct ata_device *dev; |
| 869 | 815 | ||
| 870 | if (ap->acpi_handle && gtm) { | 816 | if (ata_ap_acpi_handle(ap) && gtm) { |
| 871 | /* _GTM valid */ | 817 | /* _GTM valid */ |
| 872 | 818 | ||
| 873 | /* restore timing parameters */ | 819 | /* restore timing parameters */ |
| @@ -907,23 +853,39 @@ void ata_acpi_on_resume(struct ata_port *ap) | |||
| 907 | void ata_acpi_set_state(struct ata_port *ap, pm_message_t state) | 853 | void ata_acpi_set_state(struct ata_port *ap, pm_message_t state) |
| 908 | { | 854 | { |
| 909 | struct ata_device *dev; | 855 | struct ata_device *dev; |
| 910 | 856 | acpi_handle handle; | |
| 911 | if (!ap->acpi_handle || (ap->flags & ATA_FLAG_ACPI_SATA)) | 857 | int acpi_state; |
| 912 | return; | ||
| 913 | 858 | ||
| 914 | /* channel first and then drives for power on and vica versa | 859 | /* channel first and then drives for power on and vica versa |
| 915 | for power off */ | 860 | for power off */ |
| 916 | if (state.event == PM_EVENT_ON) | 861 | handle = ata_ap_acpi_handle(ap); |
| 917 | acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D0); | 862 | if (handle && state.event == PM_EVENT_ON) |
| 863 | acpi_bus_set_power(handle, ACPI_STATE_D0); | ||
| 918 | 864 | ||
| 919 | ata_for_each_dev(dev, &ap->link, ENABLED) { | 865 | ata_for_each_dev(dev, &ap->link, ENABLED) { |
| 920 | if (dev->acpi_handle) | 866 | handle = ata_dev_acpi_handle(dev); |
| 921 | acpi_bus_set_power(dev->acpi_handle, | 867 | if (!handle) |
| 922 | state.event == PM_EVENT_ON ? | 868 | continue; |
| 923 | ACPI_STATE_D0 : ACPI_STATE_D3); | 869 | |
| 870 | if (state.event != PM_EVENT_ON) { | ||
| 871 | acpi_state = acpi_pm_device_sleep_state( | ||
| 872 | &dev->sdev->sdev_gendev, NULL, ACPI_STATE_D3); | ||
| 873 | if (acpi_state > 0) | ||
| 874 | acpi_bus_set_power(handle, acpi_state); | ||
| 875 | /* TBD: need to check if it's runtime pm request */ | ||
| 876 | acpi_pm_device_run_wake( | ||
| 877 | &dev->sdev->sdev_gendev, true); | ||
| 878 | } else { | ||
| 879 | /* Ditto */ | ||
| 880 | acpi_pm_device_run_wake( | ||
| 881 | &dev->sdev->sdev_gendev, false); | ||
| 882 | acpi_bus_set_power(handle, ACPI_STATE_D0); | ||
| 883 | } | ||
| 924 | } | 884 | } |
| 925 | if (state.event != PM_EVENT_ON) | 885 | |
| 926 | acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D3); | 886 | handle = ata_ap_acpi_handle(ap); |
| 887 | if (handle && state.event != PM_EVENT_ON) | ||
| 888 | acpi_bus_set_power(handle, ACPI_STATE_D3); | ||
| 927 | } | 889 | } |
| 928 | 890 | ||
| 929 | /** | 891 | /** |
| @@ -948,7 +910,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev) | |||
| 948 | int nr_executed = 0; | 910 | int nr_executed = 0; |
| 949 | int rc; | 911 | int rc; |
| 950 | 912 | ||
| 951 | if (!dev->acpi_handle) | 913 | if (!ata_dev_acpi_handle(dev)) |
| 952 | return 0; | 914 | return 0; |
| 953 | 915 | ||
| 954 | /* do we need to do _GTF? */ | 916 | /* do we need to do _GTF? */ |
| @@ -994,7 +956,6 @@ int ata_acpi_on_devcfg(struct ata_device *dev) | |||
| 994 | } | 956 | } |
| 995 | 957 | ||
| 996 | ata_dev_warn(dev, "ACPI: failed the second time, disabled\n"); | 958 | ata_dev_warn(dev, "ACPI: failed the second time, disabled\n"); |
| 997 | dev->acpi_handle = NULL; | ||
| 998 | 959 | ||
| 999 | /* We can safely continue if no _GTF command has been executed | 960 | /* We can safely continue if no _GTF command has been executed |
| 1000 | * and port is not frozen. | 961 | * and port is not frozen. |
| @@ -1018,3 +979,218 @@ void ata_acpi_on_disable(struct ata_device *dev) | |||
| 1018 | { | 979 | { |
| 1019 | ata_acpi_clear_gtf(dev); | 980 | ata_acpi_clear_gtf(dev); |
| 1020 | } | 981 | } |
| 982 | |||
| 983 | static void ata_acpi_wake_dev(acpi_handle handle, u32 event, void *context) | ||
| 984 | { | ||
| 985 | struct ata_device *ata_dev = context; | ||
| 986 | |||
| 987 | if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev && | ||
| 988 | pm_runtime_suspended(&ata_dev->sdev->sdev_gendev)) | ||
| 989 | scsi_autopm_get_device(ata_dev->sdev); | ||
| 990 | } | ||
| 991 | |||
| 992 | static void ata_acpi_add_pm_notifier(struct ata_device *dev) | ||
| 993 | { | ||
| 994 | struct acpi_device *acpi_dev; | ||
| 995 | acpi_handle handle; | ||
| 996 | acpi_status status; | ||
| 997 | |||
| 998 | handle = ata_dev_acpi_handle(dev); | ||
| 999 | if (!handle) | ||
| 1000 | return; | ||
| 1001 | |||
| 1002 | status = acpi_bus_get_device(handle, &acpi_dev); | ||
| 1003 | if (ACPI_FAILURE(status)) | ||
| 1004 | return; | ||
| 1005 | |||
| 1006 | if (dev->sdev->can_power_off) { | ||
| 1007 | acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | ||
| 1008 | ata_acpi_wake_dev, dev); | ||
| 1009 | device_set_run_wake(&dev->sdev->sdev_gendev, true); | ||
| 1010 | } | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | static void ata_acpi_remove_pm_notifier(struct ata_device *dev) | ||
| 1014 | { | ||
| 1015 | struct acpi_device *acpi_dev; | ||
| 1016 | acpi_handle handle; | ||
| 1017 | acpi_status status; | ||
| 1018 | |||
| 1019 | handle = ata_dev_acpi_handle(dev); | ||
| 1020 | if (!handle) | ||
| 1021 | return; | ||
| 1022 | |||
| 1023 | status = acpi_bus_get_device(handle, &acpi_dev); | ||
| 1024 | if (ACPI_FAILURE(status)) | ||
| 1025 | return; | ||
| 1026 | |||
| 1027 | if (dev->sdev->can_power_off) { | ||
| 1028 | device_set_run_wake(&dev->sdev->sdev_gendev, false); | ||
| 1029 | acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | ||
| 1030 | ata_acpi_wake_dev); | ||
| 1031 | } | ||
| 1032 | } | ||
| 1033 | |||
| 1034 | static void ata_acpi_register_power_resource(struct ata_device *dev) | ||
| 1035 | { | ||
| 1036 | struct scsi_device *sdev = dev->sdev; | ||
| 1037 | acpi_handle handle; | ||
| 1038 | struct device *device; | ||
| 1039 | |||
| 1040 | handle = ata_dev_acpi_handle(dev); | ||
| 1041 | if (!handle) | ||
| 1042 | return; | ||
| 1043 | |||
| 1044 | device = &sdev->sdev_gendev; | ||
| 1045 | |||
| 1046 | acpi_power_resource_register_device(device, handle); | ||
| 1047 | } | ||
| 1048 | |||
| 1049 | static void ata_acpi_unregister_power_resource(struct ata_device *dev) | ||
| 1050 | { | ||
| 1051 | struct scsi_device *sdev = dev->sdev; | ||
| 1052 | acpi_handle handle; | ||
| 1053 | struct device *device; | ||
| 1054 | |||
| 1055 | handle = ata_dev_acpi_handle(dev); | ||
| 1056 | if (!handle) | ||
| 1057 | return; | ||
| 1058 | |||
| 1059 | device = &sdev->sdev_gendev; | ||
| 1060 | |||
| 1061 | acpi_power_resource_unregister_device(device, handle); | ||
| 1062 | } | ||
| 1063 | |||
| 1064 | void ata_acpi_bind(struct ata_device *dev) | ||
| 1065 | { | ||
| 1066 | ata_acpi_add_pm_notifier(dev); | ||
| 1067 | ata_acpi_register_power_resource(dev); | ||
| 1068 | } | ||
| 1069 | |||
| 1070 | void ata_acpi_unbind(struct ata_device *dev) | ||
| 1071 | { | ||
| 1072 | ata_acpi_remove_pm_notifier(dev); | ||
| 1073 | ata_acpi_unregister_power_resource(dev); | ||
| 1074 | } | ||
| 1075 | |||
| 1076 | static int compat_pci_ata(struct ata_port *ap) | ||
| 1077 | { | ||
| 1078 | struct device *dev = ap->tdev.parent; | ||
| 1079 | struct pci_dev *pdev; | ||
| 1080 | |||
| 1081 | if (!is_pci_dev(dev)) | ||
| 1082 | return 0; | ||
| 1083 | |||
| 1084 | pdev = to_pci_dev(dev); | ||
| 1085 | |||
| 1086 | if ((pdev->class >> 8) != PCI_CLASS_STORAGE_SATA && | ||
| 1087 | (pdev->class >> 8) != PCI_CLASS_STORAGE_IDE) | ||
| 1088 | return 0; | ||
| 1089 | |||
| 1090 | return 1; | ||
| 1091 | } | ||
| 1092 | |||
| 1093 | static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle) | ||
| 1094 | { | ||
| 1095 | if (ap->flags & ATA_FLAG_ACPI_SATA) | ||
| 1096 | return -ENODEV; | ||
| 1097 | |||
| 1098 | *handle = acpi_get_child(DEVICE_ACPI_HANDLE(ap->tdev.parent), | ||
| 1099 | ap->port_no); | ||
| 1100 | |||
| 1101 | if (!*handle) | ||
| 1102 | return -ENODEV; | ||
| 1103 | |||
| 1104 | return 0; | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev, | ||
| 1108 | acpi_handle *handle) | ||
| 1109 | { | ||
| 1110 | struct ata_device *ata_dev; | ||
| 1111 | acpi_status status; | ||
| 1112 | struct acpi_device *acpi_dev; | ||
| 1113 | struct acpi_device_power_state *states; | ||
| 1114 | |||
| 1115 | if (ap->flags & ATA_FLAG_ACPI_SATA) | ||
| 1116 | ata_dev = &ap->link.device[sdev->channel]; | ||
| 1117 | else | ||
| 1118 | ata_dev = &ap->link.device[sdev->id]; | ||
| 1119 | |||
| 1120 | *handle = ata_dev_acpi_handle(ata_dev); | ||
| 1121 | |||
| 1122 | if (!*handle) | ||
| 1123 | return -ENODEV; | ||
| 1124 | |||
| 1125 | status = acpi_bus_get_device(*handle, &acpi_dev); | ||
| 1126 | if (ACPI_FAILURE(status)) | ||
| 1127 | return 0; | ||
| 1128 | |||
| 1129 | /* | ||
| 1130 | * If firmware has _PS3 or _PR3 for this device, | ||
| 1131 | * and this ata ODD device support device attention, | ||
| 1132 | * it means this device can be powered off | ||
| 1133 | */ | ||
| 1134 | states = acpi_dev->power.states; | ||
| 1135 | if ((states[ACPI_STATE_D3_HOT].flags.valid || | ||
| 1136 | states[ACPI_STATE_D3_COLD].flags.explicit_set) && | ||
| 1137 | ata_dev->flags & ATA_DFLAG_DA) | ||
| 1138 | sdev->can_power_off = 1; | ||
| 1139 | |||
| 1140 | return 0; | ||
| 1141 | } | ||
| 1142 | |||
| 1143 | static int is_ata_port(const struct device *dev) | ||
| 1144 | { | ||
| 1145 | return dev->type == &ata_port_type; | ||
| 1146 | } | ||
| 1147 | |||
| 1148 | static struct ata_port *dev_to_ata_port(struct device *dev) | ||
| 1149 | { | ||
| 1150 | while (!is_ata_port(dev)) { | ||
| 1151 | if (!dev->parent) | ||
| 1152 | return NULL; | ||
| 1153 | dev = dev->parent; | ||
| 1154 | } | ||
| 1155 | return to_ata_port(dev); | ||
| 1156 | } | ||
| 1157 | |||
| 1158 | static int ata_acpi_find_device(struct device *dev, acpi_handle *handle) | ||
| 1159 | { | ||
| 1160 | struct ata_port *ap = dev_to_ata_port(dev); | ||
| 1161 | |||
| 1162 | if (!ap) | ||
| 1163 | return -ENODEV; | ||
| 1164 | |||
| 1165 | if (!compat_pci_ata(ap)) | ||
| 1166 | return -ENODEV; | ||
| 1167 | |||
| 1168 | if (scsi_is_host_device(dev)) | ||
| 1169 | return ata_acpi_bind_host(ap, handle); | ||
| 1170 | else if (scsi_is_sdev_device(dev)) { | ||
| 1171 | struct scsi_device *sdev = to_scsi_device(dev); | ||
| 1172 | |||
| 1173 | return ata_acpi_bind_device(ap, sdev, handle); | ||
| 1174 | } else | ||
| 1175 | return -ENODEV; | ||
| 1176 | } | ||
| 1177 | |||
| 1178 | static int ata_acpi_find_dummy(struct device *dev, acpi_handle *handle) | ||
| 1179 | { | ||
| 1180 | return -ENODEV; | ||
| 1181 | } | ||
| 1182 | |||
| 1183 | static struct acpi_bus_type ata_acpi_bus = { | ||
| 1184 | .find_bridge = ata_acpi_find_dummy, | ||
| 1185 | .find_device = ata_acpi_find_device, | ||
| 1186 | }; | ||
| 1187 | |||
| 1188 | int ata_acpi_register(void) | ||
| 1189 | { | ||
| 1190 | return scsi_register_acpi_bus_type(&ata_acpi_bus); | ||
| 1191 | } | ||
| 1192 | |||
| 1193 | void ata_acpi_unregister(void) | ||
| 1194 | { | ||
| 1195 | scsi_unregister_acpi_bus_type(&ata_acpi_bus); | ||
| 1196 | } | ||
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3fe1202c61ce..fadd5866d40f 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -2376,6 +2376,9 @@ int ata_dev_configure(struct ata_device *dev) | |||
| 2376 | dma_dir_string = ", DMADIR"; | 2376 | dma_dir_string = ", DMADIR"; |
| 2377 | } | 2377 | } |
| 2378 | 2378 | ||
| 2379 | if (ata_id_has_da(dev->id)) | ||
| 2380 | dev->flags |= ATA_DFLAG_DA; | ||
| 2381 | |||
| 2379 | /* print device info to dmesg */ | 2382 | /* print device info to dmesg */ |
| 2380 | if (ata_msg_drv(ap) && print_info) | 2383 | if (ata_msg_drv(ap) && print_info) |
| 2381 | ata_dev_info(dev, | 2384 | ata_dev_info(dev, |
| @@ -4128,6 +4131,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
| 4128 | 4131 | ||
| 4129 | /* Devices which aren't very happy with higher link speeds */ | 4132 | /* Devices which aren't very happy with higher link speeds */ |
| 4130 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | 4133 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, |
| 4134 | { "Seagate FreeAgent GoFlex", NULL, ATA_HORKAGE_1_5_GBPS, }, | ||
| 4131 | 4135 | ||
| 4132 | /* | 4136 | /* |
| 4133 | * Devices which choke on SETXFER. Applies only if both the | 4137 | * Devices which choke on SETXFER. Applies only if both the |
| @@ -5290,8 +5294,6 @@ static int ata_port_request_pm(struct ata_port *ap, pm_message_t mesg, | |||
| 5290 | return rc; | 5294 | return rc; |
| 5291 | } | 5295 | } |
| 5292 | 5296 | ||
| 5293 | #define to_ata_port(d) container_of(d, struct ata_port, tdev) | ||
| 5294 | |||
| 5295 | static int ata_port_suspend_common(struct device *dev, pm_message_t mesg) | 5297 | static int ata_port_suspend_common(struct device *dev, pm_message_t mesg) |
| 5296 | { | 5298 | { |
| 5297 | struct ata_port *ap = to_ata_port(dev); | 5299 | struct ata_port *ap = to_ata_port(dev); |
| @@ -6053,9 +6055,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) | |||
| 6053 | if (rc) | 6055 | if (rc) |
| 6054 | goto err_tadd; | 6056 | goto err_tadd; |
| 6055 | 6057 | ||
| 6056 | /* associate with ACPI nodes */ | ||
| 6057 | ata_acpi_associate(host); | ||
| 6058 | |||
| 6059 | /* set cable, sata_spd_limit and report */ | 6058 | /* set cable, sata_spd_limit and report */ |
| 6060 | for (i = 0; i < host->n_ports; i++) { | 6059 | for (i = 0; i < host->n_ports; i++) { |
| 6061 | struct ata_port *ap = host->ports[i]; | 6060 | struct ata_port *ap = host->ports[i]; |
| @@ -6515,6 +6514,8 @@ static int __init ata_init(void) | |||
| 6515 | 6514 | ||
| 6516 | ata_parse_force_param(); | 6515 | ata_parse_force_param(); |
| 6517 | 6516 | ||
| 6517 | ata_acpi_register(); | ||
| 6518 | |||
| 6518 | rc = ata_sff_init(); | 6519 | rc = ata_sff_init(); |
| 6519 | if (rc) { | 6520 | if (rc) { |
| 6520 | kfree(ata_force_tbl); | 6521 | kfree(ata_force_tbl); |
| @@ -6541,6 +6542,7 @@ static void __exit ata_exit(void) | |||
| 6541 | ata_release_transport(ata_scsi_transport_template); | 6542 | ata_release_transport(ata_scsi_transport_template); |
| 6542 | libata_transport_exit(); | 6543 | libata_transport_exit(); |
| 6543 | ata_sff_exit(); | 6544 | ata_sff_exit(); |
| 6545 | ata_acpi_unregister(); | ||
| 6544 | kfree(ata_force_tbl); | 6546 | kfree(ata_force_tbl); |
| 6545 | } | 6547 | } |
| 6546 | 6548 | ||
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 77fc80640e26..7d4535e989bf 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -419,7 +419,7 @@ int ata_ering_map(struct ata_ering *ering, | |||
| 419 | return rc; | 419 | return rc; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg) | 422 | static int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg) |
| 423 | { | 423 | { |
| 424 | ent->eflags |= ATA_EFLAG_OLD_ER; | 424 | ent->eflags |= ATA_EFLAG_OLD_ER; |
| 425 | return 0; | 425 | return 0; |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 21b80c555c60..61c59ee45ce9 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
| @@ -529,8 +529,6 @@ int sata_pmp_attach(struct ata_device *dev) | |||
| 529 | ata_for_each_link(tlink, ap, EDGE) | 529 | ata_for_each_link(tlink, ap, EDGE) |
| 530 | sata_link_init_spd(tlink); | 530 | sata_link_init_spd(tlink); |
| 531 | 531 | ||
| 532 | ata_acpi_associate_sata_port(ap); | ||
| 533 | |||
| 534 | return 0; | 532 | return 0; |
| 535 | 533 | ||
| 536 | fail: | 534 | fail: |
| @@ -570,8 +568,6 @@ static void sata_pmp_detach(struct ata_device *dev) | |||
| 570 | ap->nr_pmp_links = 0; | 568 | ap->nr_pmp_links = 0; |
| 571 | link->pmp = 0; | 569 | link->pmp = 0; |
| 572 | spin_unlock_irqrestore(ap->lock, flags); | 570 | spin_unlock_irqrestore(ap->lock, flags); |
| 573 | |||
| 574 | ata_acpi_associate_sata_port(ap); | ||
| 575 | } | 571 | } |
| 576 | 572 | ||
| 577 | /** | 573 | /** |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 22226350cd0c..8ec81ca8f659 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -3445,6 +3445,7 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync) | |||
| 3445 | if (!IS_ERR(sdev)) { | 3445 | if (!IS_ERR(sdev)) { |
| 3446 | dev->sdev = sdev; | 3446 | dev->sdev = sdev; |
| 3447 | scsi_device_put(sdev); | 3447 | scsi_device_put(sdev); |
| 3448 | ata_acpi_bind(dev); | ||
| 3448 | } else { | 3449 | } else { |
| 3449 | dev->sdev = NULL; | 3450 | dev->sdev = NULL; |
| 3450 | } | 3451 | } |
| @@ -3541,6 +3542,8 @@ static void ata_scsi_remove_dev(struct ata_device *dev) | |||
| 3541 | mutex_lock(&ap->scsi_host->scan_mutex); | 3542 | mutex_lock(&ap->scsi_host->scan_mutex); |
| 3542 | spin_lock_irqsave(ap->lock, flags); | 3543 | spin_lock_irqsave(ap->lock, flags); |
| 3543 | 3544 | ||
| 3545 | ata_acpi_unbind(dev); | ||
| 3546 | |||
| 3544 | /* clearing dev->sdev is protected by host lock */ | 3547 | /* clearing dev->sdev is protected by host lock */ |
| 3545 | sdev = dev->sdev; | 3548 | sdev = dev->sdev; |
| 3546 | dev->sdev = NULL; | 3549 | dev->sdev = NULL; |
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c index c34190485377..c04d393d20c1 100644 --- a/drivers/ata/libata-transport.c +++ b/drivers/ata/libata-transport.c | |||
| @@ -232,7 +232,7 @@ static void ata_tport_release(struct device *dev) | |||
| 232 | * Returns: | 232 | * Returns: |
| 233 | * %1 if the device represents a ATA Port, %0 else | 233 | * %1 if the device represents a ATA Port, %0 else |
| 234 | */ | 234 | */ |
| 235 | int ata_is_port(const struct device *dev) | 235 | static int ata_is_port(const struct device *dev) |
| 236 | { | 236 | { |
| 237 | return dev->release == ata_tport_release; | 237 | return dev->release == ata_tport_release; |
| 238 | } | 238 | } |
| @@ -355,7 +355,7 @@ static void ata_tlink_release(struct device *dev) | |||
| 355 | * Returns: | 355 | * Returns: |
| 356 | * %1 if the device represents a ATA link, %0 else | 356 | * %1 if the device represents a ATA link, %0 else |
| 357 | */ | 357 | */ |
| 358 | int ata_is_link(const struct device *dev) | 358 | static int ata_is_link(const struct device *dev) |
| 359 | { | 359 | { |
| 360 | return dev->release == ata_tlink_release; | 360 | return dev->release == ata_tlink_release; |
| 361 | } | 361 | } |
| @@ -572,7 +572,7 @@ static void ata_tdev_release(struct device *dev) | |||
| 572 | * Returns: | 572 | * Returns: |
| 573 | * %1 if the device represents a ATA device, %0 else | 573 | * %1 if the device represents a ATA device, %0 else |
| 574 | */ | 574 | */ |
| 575 | int ata_is_ata_dev(const struct device *dev) | 575 | static int ata_is_ata_dev(const struct device *dev) |
| 576 | { | 576 | { |
| 577 | return dev->release == ata_tdev_release; | 577 | return dev->release == ata_tdev_release; |
| 578 | } | 578 | } |
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 9d0fd0b71852..50e4dff0604e 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
| @@ -107,21 +107,22 @@ extern const char *sata_spd_string(unsigned int spd); | |||
| 107 | extern int ata_port_probe(struct ata_port *ap); | 107 | extern int ata_port_probe(struct ata_port *ap); |
| 108 | extern void __ata_port_probe(struct ata_port *ap); | 108 | extern void __ata_port_probe(struct ata_port *ap); |
| 109 | 109 | ||
| 110 | #define to_ata_port(d) container_of(d, struct ata_port, tdev) | ||
| 111 | |||
| 110 | /* libata-acpi.c */ | 112 | /* libata-acpi.c */ |
| 111 | #ifdef CONFIG_ATA_ACPI | 113 | #ifdef CONFIG_ATA_ACPI |
| 112 | extern unsigned int ata_acpi_gtf_filter; | 114 | extern unsigned int ata_acpi_gtf_filter; |
| 113 | |||
| 114 | extern void ata_acpi_associate_sata_port(struct ata_port *ap); | ||
| 115 | extern void ata_acpi_associate(struct ata_host *host); | ||
| 116 | extern void ata_acpi_dissociate(struct ata_host *host); | 115 | extern void ata_acpi_dissociate(struct ata_host *host); |
| 117 | extern int ata_acpi_on_suspend(struct ata_port *ap); | 116 | extern int ata_acpi_on_suspend(struct ata_port *ap); |
| 118 | extern void ata_acpi_on_resume(struct ata_port *ap); | 117 | extern void ata_acpi_on_resume(struct ata_port *ap); |
| 119 | extern int ata_acpi_on_devcfg(struct ata_device *dev); | 118 | extern int ata_acpi_on_devcfg(struct ata_device *dev); |
| 120 | extern void ata_acpi_on_disable(struct ata_device *dev); | 119 | extern void ata_acpi_on_disable(struct ata_device *dev); |
| 121 | extern void ata_acpi_set_state(struct ata_port *ap, pm_message_t state); | 120 | extern void ata_acpi_set_state(struct ata_port *ap, pm_message_t state); |
| 121 | extern int ata_acpi_register(void); | ||
| 122 | extern void ata_acpi_unregister(void); | ||
| 123 | extern void ata_acpi_bind(struct ata_device *dev); | ||
| 124 | extern void ata_acpi_unbind(struct ata_device *dev); | ||
| 122 | #else | 125 | #else |
| 123 | static inline void ata_acpi_associate_sata_port(struct ata_port *ap) { } | ||
| 124 | static inline void ata_acpi_associate(struct ata_host *host) { } | ||
| 125 | static inline void ata_acpi_dissociate(struct ata_host *host) { } | 126 | static inline void ata_acpi_dissociate(struct ata_host *host) { } |
| 126 | static inline int ata_acpi_on_suspend(struct ata_port *ap) { return 0; } | 127 | static inline int ata_acpi_on_suspend(struct ata_port *ap) { return 0; } |
| 127 | static inline void ata_acpi_on_resume(struct ata_port *ap) { } | 128 | static inline void ata_acpi_on_resume(struct ata_port *ap) { } |
| @@ -129,6 +130,10 @@ static inline int ata_acpi_on_devcfg(struct ata_device *dev) { return 0; } | |||
| 129 | static inline void ata_acpi_on_disable(struct ata_device *dev) { } | 130 | static inline void ata_acpi_on_disable(struct ata_device *dev) { } |
| 130 | static inline void ata_acpi_set_state(struct ata_port *ap, | 131 | static inline void ata_acpi_set_state(struct ata_port *ap, |
| 131 | pm_message_t state) { } | 132 | pm_message_t state) { } |
| 133 | static inline int ata_acpi_register(void) { return 0; } | ||
| 134 | static inline void ata_acpi_unregister(void) { } | ||
| 135 | static inline void ata_acpi_bind(struct ata_device *dev) { } | ||
| 136 | static inline void ata_acpi_unbind(struct ata_device *dev) { } | ||
| 132 | #endif | 137 | #endif |
| 133 | 138 | ||
| 134 | /* libata-scsi.c */ | 139 | /* libata-scsi.c */ |
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 54145edf50e8..09723b76beac 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c | |||
| @@ -39,7 +39,7 @@ static int pacpi_pre_reset(struct ata_link *link, unsigned long deadline) | |||
| 39 | { | 39 | { |
| 40 | struct ata_port *ap = link->ap; | 40 | struct ata_port *ap = link->ap; |
| 41 | struct pata_acpi *acpi = ap->private_data; | 41 | struct pata_acpi *acpi = ap->private_data; |
| 42 | if (ap->acpi_handle == NULL || ata_acpi_gtm(ap, &acpi->gtm) < 0) | 42 | if (ata_ap_acpi_handle(ap) == NULL || ata_acpi_gtm(ap, &acpi->gtm) < 0) |
| 43 | return -ENODEV; | 43 | return -ENODEV; |
| 44 | 44 | ||
| 45 | return ata_sff_prereset(link, deadline); | 45 | return ata_sff_prereset(link, deadline); |
| @@ -195,7 +195,7 @@ static int pacpi_port_start(struct ata_port *ap) | |||
| 195 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 195 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
| 196 | struct pata_acpi *acpi; | 196 | struct pata_acpi *acpi; |
| 197 | 197 | ||
| 198 | if (ap->acpi_handle == NULL) | 198 | if (ata_ap_acpi_handle(ap) == NULL) |
| 199 | return -ENODEV; | 199 | return -ENODEV; |
| 200 | 200 | ||
| 201 | acpi = ap->private_data = devm_kzalloc(&pdev->dev, sizeof(struct pata_acpi), GFP_KERNEL); | 201 | acpi = ap->private_data = devm_kzalloc(&pdev->dev, sizeof(struct pata_acpi), GFP_KERNEL); |
| @@ -273,22 +273,10 @@ static struct pci_driver pacpi_pci_driver = { | |||
| 273 | #endif | 273 | #endif |
| 274 | }; | 274 | }; |
| 275 | 275 | ||
| 276 | static int __init pacpi_init(void) | 276 | module_pci_driver(pacpi_pci_driver); |
| 277 | { | ||
| 278 | return pci_register_driver(&pacpi_pci_driver); | ||
| 279 | } | ||
| 280 | |||
| 281 | static void __exit pacpi_exit(void) | ||
| 282 | { | ||
| 283 | pci_unregister_driver(&pacpi_pci_driver); | ||
| 284 | } | ||
| 285 | |||
| 286 | module_init(pacpi_init); | ||
| 287 | module_exit(pacpi_exit); | ||
| 288 | 277 | ||
| 289 | MODULE_AUTHOR("Alan Cox"); | 278 | MODULE_AUTHOR("Alan Cox"); |
| 290 | MODULE_DESCRIPTION("SCSI low-level driver for ATA in ACPI mode"); | 279 | MODULE_DESCRIPTION("SCSI low-level driver for ATA in ACPI mode"); |
| 291 | MODULE_LICENSE("GPL"); | 280 | MODULE_LICENSE("GPL"); |
| 292 | MODULE_DEVICE_TABLE(pci, pacpi_pci_tbl); | 281 | MODULE_DEVICE_TABLE(pci, pacpi_pci_tbl); |
| 293 | MODULE_VERSION(DRV_VERSION); | 282 | MODULE_VERSION(DRV_VERSION); |
| 294 | |||
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index dc6b5dae0463..82a08922afcd 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
| @@ -632,21 +632,10 @@ static struct pci_driver amd_pci_driver = { | |||
| 632 | #endif | 632 | #endif |
| 633 | }; | 633 | }; |
| 634 | 634 | ||
| 635 | static int __init amd_init(void) | 635 | module_pci_driver(amd_pci_driver); |
| 636 | { | ||
| 637 | return pci_register_driver(&amd_pci_driver); | ||
| 638 | } | ||
| 639 | |||
| 640 | static void __exit amd_exit(void) | ||
| 641 | { | ||
| 642 | pci_unregister_driver(&amd_pci_driver); | ||
| 643 | } | ||
| 644 | 636 | ||
| 645 | MODULE_AUTHOR("Alan Cox"); | 637 | MODULE_AUTHOR("Alan Cox"); |
| 646 | MODULE_DESCRIPTION("low-level driver for AMD and Nvidia PATA IDE"); | 638 | MODULE_DESCRIPTION("low-level driver for AMD and Nvidia PATA IDE"); |
| 647 | MODULE_LICENSE("GPL"); | 639 | MODULE_LICENSE("GPL"); |
| 648 | MODULE_DEVICE_TABLE(pci, amd); | 640 | MODULE_DEVICE_TABLE(pci, amd); |
| 649 | MODULE_VERSION(DRV_VERSION); | 641 | MODULE_VERSION(DRV_VERSION); |
| 650 | |||
| 651 | module_init(amd_init); | ||
| 652 | module_exit(amd_exit); | ||
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 4b8b22efc00b..74b215c09b21 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
| @@ -451,18 +451,7 @@ static struct pci_driver artop_pci_driver = { | |||
| 451 | #endif | 451 | #endif |
| 452 | }; | 452 | }; |
| 453 | 453 | ||
| 454 | static int __init artop_init(void) | 454 | module_pci_driver(artop_pci_driver); |
| 455 | { | ||
| 456 | return pci_register_driver(&artop_pci_driver); | ||
| 457 | } | ||
| 458 | |||
| 459 | static void __exit artop_exit(void) | ||
| 460 | { | ||
| 461 | pci_unregister_driver(&artop_pci_driver); | ||
| 462 | } | ||
| 463 | |||
| 464 | module_init(artop_init); | ||
| 465 | module_exit(artop_exit); | ||
| 466 | 455 | ||
| 467 | MODULE_AUTHOR("Alan Cox, Bartlomiej Zolnierkiewicz"); | 456 | MODULE_AUTHOR("Alan Cox, Bartlomiej Zolnierkiewicz"); |
| 468 | MODULE_DESCRIPTION("SCSI low-level driver for ARTOP PATA"); | 457 | MODULE_DESCRIPTION("SCSI low-level driver for ARTOP PATA"); |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index be1aa1486d39..361c75cea57b 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
| @@ -289,22 +289,10 @@ static struct pci_driver atiixp_pci_driver = { | |||
| 289 | #endif | 289 | #endif |
| 290 | }; | 290 | }; |
| 291 | 291 | ||
| 292 | static int __init atiixp_init(void) | 292 | module_pci_driver(atiixp_pci_driver); |
| 293 | { | ||
| 294 | return pci_register_driver(&atiixp_pci_driver); | ||
| 295 | } | ||
| 296 | |||
| 297 | |||
| 298 | static void __exit atiixp_exit(void) | ||
| 299 | { | ||
| 300 | pci_unregister_driver(&atiixp_pci_driver); | ||
| 301 | } | ||
| 302 | 293 | ||
| 303 | MODULE_AUTHOR("Alan Cox"); | 294 | MODULE_AUTHOR("Alan Cox"); |
| 304 | MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400"); | 295 | MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400"); |
| 305 | MODULE_LICENSE("GPL"); | 296 | MODULE_LICENSE("GPL"); |
| 306 | MODULE_DEVICE_TABLE(pci, atiixp); | 297 | MODULE_DEVICE_TABLE(pci, atiixp); |
| 307 | MODULE_VERSION(DRV_VERSION); | 298 | MODULE_VERSION(DRV_VERSION); |
| 308 | |||
| 309 | module_init(atiixp_init); | ||
| 310 | module_exit(atiixp_exit); | ||
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 3cfabb262af2..041f50d53240 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c | |||
| @@ -565,21 +565,10 @@ static struct pci_driver atp867x_driver = { | |||
| 565 | #endif | 565 | #endif |
| 566 | }; | 566 | }; |
| 567 | 567 | ||
| 568 | static int __init atp867x_init(void) | 568 | module_pci_driver(atp867x_driver); |
| 569 | { | ||
| 570 | return pci_register_driver(&atp867x_driver); | ||
| 571 | } | ||
| 572 | |||
| 573 | static void __exit atp867x_exit(void) | ||
| 574 | { | ||
| 575 | pci_unregister_driver(&atp867x_driver); | ||
| 576 | } | ||
| 577 | 569 | ||
| 578 | MODULE_AUTHOR("John(Jung-Ik) Lee, Google Inc."); | 570 | MODULE_AUTHOR("John(Jung-Ik) Lee, Google Inc."); |
| 579 | MODULE_DESCRIPTION("low level driver for Artop/Acard 867x ATA controller"); | 571 | MODULE_DESCRIPTION("low level driver for Artop/Acard 867x ATA controller"); |
| 580 | MODULE_LICENSE("GPL"); | 572 | MODULE_LICENSE("GPL"); |
| 581 | MODULE_DEVICE_TABLE(pci, atp867x_pci_tbl); | 573 | MODULE_DEVICE_TABLE(pci, atp867x_pci_tbl); |
| 582 | MODULE_VERSION(DRV_VERSION); | 574 | MODULE_VERSION(DRV_VERSION); |
| 583 | |||
| 584 | module_init(atp867x_init); | ||
| 585 | module_exit(atp867x_exit); | ||
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 549d28dbf90d..504b98b58e19 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c | |||
| @@ -263,21 +263,10 @@ static struct pci_driver cmd640_pci_driver = { | |||
| 263 | #endif | 263 | #endif |
| 264 | }; | 264 | }; |
| 265 | 265 | ||
| 266 | static int __init cmd640_init(void) | 266 | module_pci_driver(cmd640_pci_driver); |
| 267 | { | ||
| 268 | return pci_register_driver(&cmd640_pci_driver); | ||
| 269 | } | ||
| 270 | |||
| 271 | static void __exit cmd640_exit(void) | ||
| 272 | { | ||
| 273 | pci_unregister_driver(&cmd640_pci_driver); | ||
| 274 | } | ||
| 275 | 267 | ||
| 276 | MODULE_AUTHOR("Alan Cox"); | 268 | MODULE_AUTHOR("Alan Cox"); |
| 277 | MODULE_DESCRIPTION("low-level driver for CMD640 PATA controllers"); | 269 | MODULE_DESCRIPTION("low-level driver for CMD640 PATA controllers"); |
| 278 | MODULE_LICENSE("GPL"); | 270 | MODULE_LICENSE("GPL"); |
| 279 | MODULE_DEVICE_TABLE(pci, cmd640); | 271 | MODULE_DEVICE_TABLE(pci, cmd640); |
| 280 | MODULE_VERSION(DRV_VERSION); | 272 | MODULE_VERSION(DRV_VERSION); |
| 281 | |||
| 282 | module_init(cmd640_init); | ||
| 283 | module_exit(cmd640_exit); | ||
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 1c17cd1e8b2d..7ba01415b676 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
| @@ -423,7 +423,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 423 | .port_ops = &cmd648_port_ops | 423 | .port_ops = &cmd648_port_ops |
| 424 | } | 424 | } |
| 425 | }; | 425 | }; |
| 426 | const struct ata_port_info *ppi[] = { | 426 | const struct ata_port_info *ppi[] = { |
| 427 | &cmd_info[id->driver_data], | 427 | &cmd_info[id->driver_data], |
| 428 | &cmd_info[id->driver_data], | 428 | &cmd_info[id->driver_data], |
| 429 | NULL | 429 | NULL |
| @@ -478,7 +478,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 478 | if (port_ok && cntrl_ch0_ok && !(reg & CNTRL_CH0)) { | 478 | if (port_ok && cntrl_ch0_ok && !(reg & CNTRL_CH0)) { |
| 479 | dev_printk(KERN_NOTICE, &pdev->dev, "Primary port is disabled\n"); | 479 | dev_printk(KERN_NOTICE, &pdev->dev, "Primary port is disabled\n"); |
| 480 | ppi[0] = &ata_dummy_port_info; | 480 | ppi[0] = &ata_dummy_port_info; |
| 481 | 481 | ||
| 482 | } | 482 | } |
| 483 | if (port_ok && !(reg & CNTRL_CH1)) { | 483 | if (port_ok && !(reg & CNTRL_CH1)) { |
| 484 | dev_printk(KERN_NOTICE, &pdev->dev, "Secondary port is disabled\n"); | 484 | dev_printk(KERN_NOTICE, &pdev->dev, "Secondary port is disabled\n"); |
| @@ -525,21 +525,10 @@ static struct pci_driver cmd64x_pci_driver = { | |||
| 525 | #endif | 525 | #endif |
| 526 | }; | 526 | }; |
| 527 | 527 | ||
| 528 | static int __init cmd64x_init(void) | 528 | module_pci_driver(cmd64x_pci_driver); |
| 529 | { | ||
| 530 | return pci_register_driver(&cmd64x_pci_driver); | ||
| 531 | } | ||
| 532 | |||
| 533 | static void __exit cmd64x_exit(void) | ||
| 534 | { | ||
| 535 | pci_unregister_driver(&cmd64x_pci_driver); | ||
| 536 | } | ||
| 537 | 529 | ||
| 538 | MODULE_AUTHOR("Alan Cox"); | 530 | MODULE_AUTHOR("Alan Cox"); |
| 539 | MODULE_DESCRIPTION("low-level driver for CMD64x series PATA controllers"); | 531 | MODULE_DESCRIPTION("low-level driver for CMD64x series PATA controllers"); |
| 540 | MODULE_LICENSE("GPL"); | 532 | MODULE_LICENSE("GPL"); |
| 541 | MODULE_DEVICE_TABLE(pci, cmd64x); | 533 | MODULE_DEVICE_TABLE(pci, cmd64x); |
| 542 | MODULE_VERSION(DRV_VERSION); | 534 | MODULE_VERSION(DRV_VERSION); |
| 543 | |||
| 544 | module_init(cmd64x_init); | ||
| 545 | module_exit(cmd64x_exit); | ||
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 9ddcddc66a20..de74d804f031 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
| @@ -302,22 +302,10 @@ static struct pci_driver cs5520_pci_driver = { | |||
| 302 | #endif | 302 | #endif |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | static int __init cs5520_init(void) | 305 | module_pci_driver(cs5520_pci_driver); |
| 306 | { | ||
| 307 | return pci_register_driver(&cs5520_pci_driver); | ||
| 308 | } | ||
| 309 | |||
| 310 | static void __exit cs5520_exit(void) | ||
| 311 | { | ||
| 312 | pci_unregister_driver(&cs5520_pci_driver); | ||
| 313 | } | ||
| 314 | 306 | ||
| 315 | MODULE_AUTHOR("Alan Cox"); | 307 | MODULE_AUTHOR("Alan Cox"); |
| 316 | MODULE_DESCRIPTION("low-level driver for Cyrix CS5510/5520"); | 308 | MODULE_DESCRIPTION("low-level driver for Cyrix CS5510/5520"); |
| 317 | MODULE_LICENSE("GPL"); | 309 | MODULE_LICENSE("GPL"); |
| 318 | MODULE_DEVICE_TABLE(pci, pata_cs5520); | 310 | MODULE_DEVICE_TABLE(pci, pata_cs5520); |
| 319 | MODULE_VERSION(DRV_VERSION); | 311 | MODULE_VERSION(DRV_VERSION); |
| 320 | |||
| 321 | module_init(cs5520_init); | ||
| 322 | module_exit(cs5520_exit); | ||
| 323 | |||
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index f792330f0d8e..48389ae0b330 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
| @@ -363,21 +363,10 @@ static struct pci_driver cs5530_pci_driver = { | |||
| 363 | #endif | 363 | #endif |
| 364 | }; | 364 | }; |
| 365 | 365 | ||
| 366 | static int __init cs5530_init(void) | 366 | module_pci_driver(cs5530_pci_driver); |
| 367 | { | ||
| 368 | return pci_register_driver(&cs5530_pci_driver); | ||
| 369 | } | ||
| 370 | |||
| 371 | static void __exit cs5530_exit(void) | ||
| 372 | { | ||
| 373 | pci_unregister_driver(&cs5530_pci_driver); | ||
| 374 | } | ||
| 375 | 367 | ||
| 376 | MODULE_AUTHOR("Alan Cox"); | 368 | MODULE_AUTHOR("Alan Cox"); |
| 377 | MODULE_DESCRIPTION("low-level driver for the Cyrix/NS/AMD 5530"); | 369 | MODULE_DESCRIPTION("low-level driver for the Cyrix/NS/AMD 5530"); |
| 378 | MODULE_LICENSE("GPL"); | 370 | MODULE_LICENSE("GPL"); |
| 379 | MODULE_DEVICE_TABLE(pci, cs5530); | 371 | MODULE_DEVICE_TABLE(pci, cs5530); |
| 380 | MODULE_VERSION(DRV_VERSION); | 372 | MODULE_VERSION(DRV_VERSION); |
| 381 | |||
| 382 | module_init(cs5530_init); | ||
| 383 | module_exit(cs5530_exit); | ||
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index a0b4640125ae..997e16a3a63f 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
| @@ -207,21 +207,10 @@ static struct pci_driver cs5535_pci_driver = { | |||
| 207 | #endif | 207 | #endif |
| 208 | }; | 208 | }; |
| 209 | 209 | ||
| 210 | static int __init cs5535_init(void) | 210 | module_pci_driver(cs5535_pci_driver); |
| 211 | { | ||
| 212 | return pci_register_driver(&cs5535_pci_driver); | ||
| 213 | } | ||
| 214 | |||
| 215 | static void __exit cs5535_exit(void) | ||
| 216 | { | ||
| 217 | pci_unregister_driver(&cs5535_pci_driver); | ||
| 218 | } | ||
| 219 | 211 | ||
| 220 | MODULE_AUTHOR("Alan Cox, Jens Altmann, Wolfgan Zuleger, Alexander Kiausch"); | 212 | MODULE_AUTHOR("Alan Cox, Jens Altmann, Wolfgan Zuleger, Alexander Kiausch"); |
| 221 | MODULE_DESCRIPTION("low-level driver for the NS/AMD 5535"); | 213 | MODULE_DESCRIPTION("low-level driver for the NS/AMD 5535"); |
| 222 | MODULE_LICENSE("GPL"); | 214 | MODULE_LICENSE("GPL"); |
| 223 | MODULE_DEVICE_TABLE(pci, cs5535); | 215 | MODULE_DEVICE_TABLE(pci, cs5535); |
| 224 | MODULE_VERSION(DRV_VERSION); | 216 | MODULE_VERSION(DRV_VERSION); |
| 225 | |||
| 226 | module_init(cs5535_init); | ||
| 227 | module_exit(cs5535_exit); | ||
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 7a402c75ab90..dec1b6c4b351 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
| @@ -274,21 +274,10 @@ static struct pci_driver cs5536_pci_driver = { | |||
| 274 | #endif | 274 | #endif |
| 275 | }; | 275 | }; |
| 276 | 276 | ||
| 277 | static int __init cs5536_init(void) | 277 | module_pci_driver(cs5536_pci_driver); |
| 278 | { | ||
| 279 | return pci_register_driver(&cs5536_pci_driver); | ||
| 280 | } | ||
| 281 | |||
| 282 | static void __exit cs5536_exit(void) | ||
| 283 | { | ||
| 284 | pci_unregister_driver(&cs5536_pci_driver); | ||
| 285 | } | ||
| 286 | 278 | ||
| 287 | MODULE_AUTHOR("Martin K. Petersen"); | 279 | MODULE_AUTHOR("Martin K. Petersen"); |
| 288 | MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller"); | 280 | MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller"); |
| 289 | MODULE_LICENSE("GPL"); | 281 | MODULE_LICENSE("GPL"); |
| 290 | MODULE_DEVICE_TABLE(pci, cs5536); | 282 | MODULE_DEVICE_TABLE(pci, cs5536); |
| 291 | MODULE_VERSION(DRV_VERSION); | 283 | MODULE_VERSION(DRV_VERSION); |
| 292 | |||
| 293 | module_init(cs5536_init); | ||
| 294 | module_exit(cs5536_exit); | ||
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index 6d915b063d93..810bc9964dde 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
| @@ -158,23 +158,10 @@ static struct pci_driver cy82c693_pci_driver = { | |||
| 158 | #endif | 158 | #endif |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | static int __init cy82c693_init(void) | 161 | module_pci_driver(cy82c693_pci_driver); |
| 162 | { | ||
| 163 | return pci_register_driver(&cy82c693_pci_driver); | ||
| 164 | } | ||
| 165 | |||
| 166 | |||
| 167 | static void __exit cy82c693_exit(void) | ||
| 168 | { | ||
| 169 | pci_unregister_driver(&cy82c693_pci_driver); | ||
| 170 | } | ||
| 171 | |||
| 172 | 162 | ||
| 173 | MODULE_AUTHOR("Alan Cox"); | 163 | MODULE_AUTHOR("Alan Cox"); |
| 174 | MODULE_DESCRIPTION("low-level driver for the CY82C693 PATA controller"); | 164 | MODULE_DESCRIPTION("low-level driver for the CY82C693 PATA controller"); |
| 175 | MODULE_LICENSE("GPL"); | 165 | MODULE_LICENSE("GPL"); |
| 176 | MODULE_DEVICE_TABLE(pci, cy82c693); | 166 | MODULE_DEVICE_TABLE(pci, cy82c693); |
| 177 | MODULE_VERSION(DRV_VERSION); | 167 | MODULE_VERSION(DRV_VERSION); |
| 178 | |||
| 179 | module_init(cy82c693_init); | ||
| 180 | module_exit(cy82c693_exit); | ||
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index f0243ed206f7..3c12fd7acd41 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
| @@ -295,22 +295,10 @@ static struct pci_driver efar_pci_driver = { | |||
| 295 | #endif | 295 | #endif |
| 296 | }; | 296 | }; |
| 297 | 297 | ||
| 298 | static int __init efar_init(void) | 298 | module_pci_driver(efar_pci_driver); |
| 299 | { | ||
| 300 | return pci_register_driver(&efar_pci_driver); | ||
| 301 | } | ||
| 302 | |||
| 303 | static void __exit efar_exit(void) | ||
| 304 | { | ||
| 305 | pci_unregister_driver(&efar_pci_driver); | ||
| 306 | } | ||
| 307 | |||
| 308 | module_init(efar_init); | ||
| 309 | module_exit(efar_exit); | ||
| 310 | 299 | ||
| 311 | MODULE_AUTHOR("Alan Cox"); | 300 | MODULE_AUTHOR("Alan Cox"); |
| 312 | MODULE_DESCRIPTION("SCSI low-level driver for EFAR PIIX clones"); | 301 | MODULE_DESCRIPTION("SCSI low-level driver for EFAR PIIX clones"); |
| 313 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
| 314 | MODULE_DEVICE_TABLE(pci, efar_pci_tbl); | 303 | MODULE_DEVICE_TABLE(pci, efar_pci_tbl); |
| 315 | MODULE_VERSION(DRV_VERSION); | 304 | MODULE_VERSION(DRV_VERSION); |
| 316 | |||
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index 42cffd38910d..4be884a9f5ed 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
| @@ -418,21 +418,10 @@ static struct pci_driver hpt36x_pci_driver = { | |||
| 418 | #endif | 418 | #endif |
| 419 | }; | 419 | }; |
| 420 | 420 | ||
| 421 | static int __init hpt36x_init(void) | 421 | module_pci_driver(hpt36x_pci_driver); |
| 422 | { | ||
| 423 | return pci_register_driver(&hpt36x_pci_driver); | ||
| 424 | } | ||
| 425 | |||
| 426 | static void __exit hpt36x_exit(void) | ||
| 427 | { | ||
| 428 | pci_unregister_driver(&hpt36x_pci_driver); | ||
| 429 | } | ||
| 430 | 422 | ||
| 431 | MODULE_AUTHOR("Alan Cox"); | 423 | MODULE_AUTHOR("Alan Cox"); |
| 432 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT366/368"); | 424 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT366/368"); |
| 433 | MODULE_LICENSE("GPL"); | 425 | MODULE_LICENSE("GPL"); |
| 434 | MODULE_DEVICE_TABLE(pci, hpt36x); | 426 | MODULE_DEVICE_TABLE(pci, hpt36x); |
| 435 | MODULE_VERSION(DRV_VERSION); | 427 | MODULE_VERSION(DRV_VERSION); |
| 436 | |||
| 437 | module_init(hpt36x_init); | ||
| 438 | module_exit(hpt36x_exit); | ||
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 9620636aa405..a9d74eff5fc4 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
| @@ -1058,21 +1058,10 @@ static struct pci_driver hpt37x_pci_driver = { | |||
| 1058 | .remove = ata_pci_remove_one | 1058 | .remove = ata_pci_remove_one |
| 1059 | }; | 1059 | }; |
| 1060 | 1060 | ||
| 1061 | static int __init hpt37x_init(void) | 1061 | module_pci_driver(hpt37x_pci_driver); |
| 1062 | { | ||
| 1063 | return pci_register_driver(&hpt37x_pci_driver); | ||
| 1064 | } | ||
| 1065 | |||
| 1066 | static void __exit hpt37x_exit(void) | ||
| 1067 | { | ||
| 1068 | pci_unregister_driver(&hpt37x_pci_driver); | ||
| 1069 | } | ||
| 1070 | 1062 | ||
| 1071 | MODULE_AUTHOR("Alan Cox"); | 1063 | MODULE_AUTHOR("Alan Cox"); |
| 1072 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT37x/30x"); | 1064 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT37x/30x"); |
| 1073 | MODULE_LICENSE("GPL"); | 1065 | MODULE_LICENSE("GPL"); |
| 1074 | MODULE_DEVICE_TABLE(pci, hpt37x); | 1066 | MODULE_DEVICE_TABLE(pci, hpt37x); |
| 1075 | MODULE_VERSION(DRV_VERSION); | 1067 | MODULE_VERSION(DRV_VERSION); |
| 1076 | |||
| 1077 | module_init(hpt37x_init); | ||
| 1078 | module_exit(hpt37x_exit); | ||
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 765f136d8cd3..4be0398c153d 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c | |||
| @@ -621,21 +621,10 @@ static struct pci_driver hpt3x2n_pci_driver = { | |||
| 621 | .remove = ata_pci_remove_one | 621 | .remove = ata_pci_remove_one |
| 622 | }; | 622 | }; |
| 623 | 623 | ||
| 624 | static int __init hpt3x2n_init(void) | 624 | module_pci_driver(hpt3x2n_pci_driver); |
| 625 | { | ||
| 626 | return pci_register_driver(&hpt3x2n_pci_driver); | ||
| 627 | } | ||
| 628 | |||
| 629 | static void __exit hpt3x2n_exit(void) | ||
| 630 | { | ||
| 631 | pci_unregister_driver(&hpt3x2n_pci_driver); | ||
| 632 | } | ||
| 633 | 625 | ||
| 634 | MODULE_AUTHOR("Alan Cox"); | 626 | MODULE_AUTHOR("Alan Cox"); |
| 635 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT3xxN"); | 627 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT3xxN"); |
| 636 | MODULE_LICENSE("GPL"); | 628 | MODULE_LICENSE("GPL"); |
| 637 | MODULE_DEVICE_TABLE(pci, hpt3x2n); | 629 | MODULE_DEVICE_TABLE(pci, hpt3x2n); |
| 638 | MODULE_VERSION(DRV_VERSION); | 630 | MODULE_VERSION(DRV_VERSION); |
| 639 | |||
| 640 | module_init(hpt3x2n_init); | ||
| 641 | module_exit(hpt3x2n_exit); | ||
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c index b3042dab08bb..76c9314bb824 100644 --- a/drivers/ata/pata_hpt3x3.c +++ b/drivers/ata/pata_hpt3x3.c | |||
| @@ -284,23 +284,10 @@ static struct pci_driver hpt3x3_pci_driver = { | |||
| 284 | #endif | 284 | #endif |
| 285 | }; | 285 | }; |
| 286 | 286 | ||
| 287 | static int __init hpt3x3_init(void) | 287 | module_pci_driver(hpt3x3_pci_driver); |
| 288 | { | ||
| 289 | return pci_register_driver(&hpt3x3_pci_driver); | ||
| 290 | } | ||
| 291 | |||
| 292 | |||
| 293 | static void __exit hpt3x3_exit(void) | ||
| 294 | { | ||
| 295 | pci_unregister_driver(&hpt3x3_pci_driver); | ||
| 296 | } | ||
| 297 | |||
| 298 | 288 | ||
| 299 | MODULE_AUTHOR("Alan Cox"); | 289 | MODULE_AUTHOR("Alan Cox"); |
| 300 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT343/363"); | 290 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT343/363"); |
| 301 | MODULE_LICENSE("GPL"); | 291 | MODULE_LICENSE("GPL"); |
| 302 | MODULE_DEVICE_TABLE(pci, hpt3x3); | 292 | MODULE_DEVICE_TABLE(pci, hpt3x3); |
| 303 | MODULE_VERSION(DRV_VERSION); | 293 | MODULE_VERSION(DRV_VERSION); |
| 304 | |||
| 305 | module_init(hpt3x3_init); | ||
| 306 | module_exit(hpt3x3_exit); | ||
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index c5af97f5107b..87bb05b3cafc 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c | |||
| @@ -118,7 +118,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev) | |||
| 118 | return PTR_ERR(priv->clk); | 118 | return PTR_ERR(priv->clk); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | clk_enable(priv->clk); | 121 | clk_prepare_enable(priv->clk); |
| 122 | 122 | ||
| 123 | host = ata_host_alloc(&pdev->dev, 1); | 123 | host = ata_host_alloc(&pdev->dev, 1); |
| 124 | if (!host) | 124 | if (!host) |
| @@ -162,7 +162,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev) | |||
| 162 | &pata_imx_sht); | 162 | &pata_imx_sht); |
| 163 | 163 | ||
| 164 | free_priv: | 164 | free_priv: |
| 165 | clk_disable(priv->clk); | 165 | clk_disable_unprepare(priv->clk); |
| 166 | clk_put(priv->clk); | 166 | clk_put(priv->clk); |
| 167 | return -ENOMEM; | 167 | return -ENOMEM; |
| 168 | } | 168 | } |
| @@ -176,7 +176,7 @@ static int __devexit pata_imx_remove(struct platform_device *pdev) | |||
| 176 | 176 | ||
| 177 | __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN); | 177 | __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN); |
| 178 | 178 | ||
| 179 | clk_disable(priv->clk); | 179 | clk_disable_unprepare(priv->clk); |
| 180 | clk_put(priv->clk); | 180 | clk_put(priv->clk); |
| 181 | 181 | ||
| 182 | return 0; | 182 | return 0; |
| @@ -194,7 +194,7 @@ static int pata_imx_suspend(struct device *dev) | |||
| 194 | __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN); | 194 | __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN); |
| 195 | priv->ata_ctl = | 195 | priv->ata_ctl = |
| 196 | __raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL); | 196 | __raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL); |
| 197 | clk_disable(priv->clk); | 197 | clk_disable_unprepare(priv->clk); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | return ret; | 200 | return ret; |
| @@ -205,7 +205,7 @@ static int pata_imx_resume(struct device *dev) | |||
| 205 | struct ata_host *host = dev_get_drvdata(dev); | 205 | struct ata_host *host = dev_get_drvdata(dev); |
| 206 | struct pata_imx_priv *priv = host->private_data; | 206 | struct pata_imx_priv *priv = host->private_data; |
| 207 | 207 | ||
| 208 | clk_enable(priv->clk); | 208 | clk_prepare_enable(priv->clk); |
| 209 | 209 | ||
| 210 | __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); | 210 | __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); |
| 211 | 211 | ||
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index cf9164d79f11..2a8dd9527ecc 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c | |||
| @@ -290,18 +290,7 @@ static struct pci_driver it8213_pci_driver = { | |||
| 290 | #endif | 290 | #endif |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | static int __init it8213_init(void) | 293 | module_pci_driver(it8213_pci_driver); |
| 294 | { | ||
| 295 | return pci_register_driver(&it8213_pci_driver); | ||
| 296 | } | ||
| 297 | |||
| 298 | static void __exit it8213_exit(void) | ||
| 299 | { | ||
| 300 | pci_unregister_driver(&it8213_pci_driver); | ||
| 301 | } | ||
| 302 | |||
| 303 | module_init(it8213_init); | ||
| 304 | module_exit(it8213_exit); | ||
| 305 | 294 | ||
| 306 | MODULE_AUTHOR("Alan Cox"); | 295 | MODULE_AUTHOR("Alan Cox"); |
| 307 | MODULE_DESCRIPTION("SCSI low-level driver for the ITE 8213"); | 296 | MODULE_DESCRIPTION("SCSI low-level driver for the ITE 8213"); |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 62c5d00abd2e..9cc05d808ad5 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
| @@ -972,15 +972,7 @@ static struct pci_driver it821x_pci_driver = { | |||
| 972 | #endif | 972 | #endif |
| 973 | }; | 973 | }; |
| 974 | 974 | ||
| 975 | static int __init it821x_init(void) | 975 | module_pci_driver(it821x_pci_driver); |
| 976 | { | ||
| 977 | return pci_register_driver(&it821x_pci_driver); | ||
| 978 | } | ||
| 979 | |||
| 980 | static void __exit it821x_exit(void) | ||
| 981 | { | ||
| 982 | pci_unregister_driver(&it821x_pci_driver); | ||
| 983 | } | ||
| 984 | 976 | ||
| 985 | MODULE_AUTHOR("Alan Cox"); | 977 | MODULE_AUTHOR("Alan Cox"); |
| 986 | MODULE_DESCRIPTION("low-level driver for the IT8211/IT8212 IDE RAID controller"); | 978 | MODULE_DESCRIPTION("low-level driver for the IT8211/IT8212 IDE RAID controller"); |
| @@ -988,9 +980,5 @@ MODULE_LICENSE("GPL"); | |||
| 988 | MODULE_DEVICE_TABLE(pci, it821x); | 980 | MODULE_DEVICE_TABLE(pci, it821x); |
| 989 | MODULE_VERSION(DRV_VERSION); | 981 | MODULE_VERSION(DRV_VERSION); |
| 990 | 982 | ||
| 991 | |||
| 992 | module_param_named(noraid, it8212_noraid, int, S_IRUGO); | 983 | module_param_named(noraid, it8212_noraid, int, S_IRUGO); |
| 993 | MODULE_PARM_DESC(noraid, "Force card into bypass mode"); | 984 | MODULE_PARM_DESC(noraid, "Force card into bypass mode"); |
| 994 | |||
| 995 | module_init(it821x_init); | ||
| 996 | module_exit(it821x_exit); | ||
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index cb3babbb7035..76e739b031b6 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
| @@ -164,18 +164,7 @@ static struct pci_driver jmicron_pci_driver = { | |||
| 164 | #endif | 164 | #endif |
| 165 | }; | 165 | }; |
| 166 | 166 | ||
| 167 | static int __init jmicron_init(void) | 167 | module_pci_driver(jmicron_pci_driver); |
| 168 | { | ||
| 169 | return pci_register_driver(&jmicron_pci_driver); | ||
| 170 | } | ||
| 171 | |||
| 172 | static void __exit jmicron_exit(void) | ||
| 173 | { | ||
| 174 | pci_unregister_driver(&jmicron_pci_driver); | ||
| 175 | } | ||
| 176 | |||
| 177 | module_init(jmicron_init); | ||
| 178 | module_exit(jmicron_exit); | ||
| 179 | 168 | ||
| 180 | MODULE_AUTHOR("Alan Cox"); | 169 | MODULE_AUTHOR("Alan Cox"); |
| 181 | MODULE_DESCRIPTION("SCSI low-level driver for Jmicron PATA ports"); | 170 | MODULE_DESCRIPTION("SCSI low-level driver for Jmicron PATA ports"); |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 5d7f58a7e34d..a4f5e781c8c2 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
| @@ -178,22 +178,10 @@ static struct pci_driver marvell_pci_driver = { | |||
| 178 | #endif | 178 | #endif |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | static int __init marvell_init(void) | 181 | module_pci_driver(marvell_pci_driver); |
| 182 | { | ||
| 183 | return pci_register_driver(&marvell_pci_driver); | ||
| 184 | } | ||
| 185 | |||
| 186 | static void __exit marvell_exit(void) | ||
| 187 | { | ||
| 188 | pci_unregister_driver(&marvell_pci_driver); | ||
| 189 | } | ||
| 190 | |||
| 191 | module_init(marvell_init); | ||
| 192 | module_exit(marvell_exit); | ||
| 193 | 182 | ||
| 194 | MODULE_AUTHOR("Alan Cox"); | 183 | MODULE_AUTHOR("Alan Cox"); |
| 195 | MODULE_DESCRIPTION("SCSI low-level driver for Marvell ATA in legacy mode"); | 184 | MODULE_DESCRIPTION("SCSI low-level driver for Marvell ATA in legacy mode"); |
| 196 | MODULE_LICENSE("GPL"); | 185 | MODULE_LICENSE("GPL"); |
| 197 | MODULE_DEVICE_TABLE(pci, marvell_pci_tbl); | 186 | MODULE_DEVICE_TABLE(pci, marvell_pci_tbl); |
| 198 | MODULE_VERSION(DRV_VERSION); | 187 | MODULE_VERSION(DRV_VERSION); |
| 199 | |||
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index 9dc16df84191..1f5f28bb0bb8 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
| @@ -230,21 +230,10 @@ static struct pci_driver mpiix_pci_driver = { | |||
| 230 | #endif | 230 | #endif |
| 231 | }; | 231 | }; |
| 232 | 232 | ||
| 233 | static int __init mpiix_init(void) | 233 | module_pci_driver(mpiix_pci_driver); |
| 234 | { | ||
| 235 | return pci_register_driver(&mpiix_pci_driver); | ||
| 236 | } | ||
| 237 | |||
| 238 | static void __exit mpiix_exit(void) | ||
| 239 | { | ||
| 240 | pci_unregister_driver(&mpiix_pci_driver); | ||
| 241 | } | ||
| 242 | 234 | ||
| 243 | MODULE_AUTHOR("Alan Cox"); | 235 | MODULE_AUTHOR("Alan Cox"); |
| 244 | MODULE_DESCRIPTION("low-level driver for Intel MPIIX"); | 236 | MODULE_DESCRIPTION("low-level driver for Intel MPIIX"); |
| 245 | MODULE_LICENSE("GPL"); | 237 | MODULE_LICENSE("GPL"); |
| 246 | MODULE_DEVICE_TABLE(pci, mpiix); | 238 | MODULE_DEVICE_TABLE(pci, mpiix); |
| 247 | MODULE_VERSION(DRV_VERSION); | 239 | MODULE_VERSION(DRV_VERSION); |
| 248 | |||
| 249 | module_init(mpiix_init); | ||
| 250 | module_exit(mpiix_exit); | ||
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index 9979a43bc596..ad1a0febd620 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c | |||
| @@ -99,22 +99,10 @@ static struct pci_driver netcell_pci_driver = { | |||
| 99 | #endif | 99 | #endif |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | static int __init netcell_init(void) | 102 | module_pci_driver(netcell_pci_driver); |
| 103 | { | ||
| 104 | return pci_register_driver(&netcell_pci_driver); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void __exit netcell_exit(void) | ||
| 108 | { | ||
| 109 | pci_unregister_driver(&netcell_pci_driver); | ||
| 110 | } | ||
| 111 | |||
| 112 | module_init(netcell_init); | ||
| 113 | module_exit(netcell_exit); | ||
| 114 | 103 | ||
| 115 | MODULE_AUTHOR("Alan Cox"); | 104 | MODULE_AUTHOR("Alan Cox"); |
| 116 | MODULE_DESCRIPTION("SCSI low-level driver for Netcell PATA RAID"); | 105 | MODULE_DESCRIPTION("SCSI low-level driver for Netcell PATA RAID"); |
| 117 | MODULE_LICENSE("GPL"); | 106 | MODULE_LICENSE("GPL"); |
| 118 | MODULE_DEVICE_TABLE(pci, netcell_pci_tbl); | 107 | MODULE_DEVICE_TABLE(pci, netcell_pci_tbl); |
| 119 | MODULE_VERSION(DRV_VERSION); | 108 | MODULE_VERSION(DRV_VERSION); |
| 120 | |||
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index e277a142138c..12010ed596c4 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c | |||
| @@ -190,21 +190,10 @@ static struct pci_driver ninja32_pci_driver = { | |||
| 190 | #endif | 190 | #endif |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | static int __init ninja32_init(void) | 193 | module_pci_driver(ninja32_pci_driver); |
| 194 | { | ||
| 195 | return pci_register_driver(&ninja32_pci_driver); | ||
| 196 | } | ||
| 197 | |||
| 198 | static void __exit ninja32_exit(void) | ||
| 199 | { | ||
| 200 | pci_unregister_driver(&ninja32_pci_driver); | ||
| 201 | } | ||
| 202 | 194 | ||
| 203 | MODULE_AUTHOR("Alan Cox"); | 195 | MODULE_AUTHOR("Alan Cox"); |
| 204 | MODULE_DESCRIPTION("low-level driver for Ninja32 ATA"); | 196 | MODULE_DESCRIPTION("low-level driver for Ninja32 ATA"); |
| 205 | MODULE_LICENSE("GPL"); | 197 | MODULE_LICENSE("GPL"); |
| 206 | MODULE_DEVICE_TABLE(pci, ninja32); | 198 | MODULE_DEVICE_TABLE(pci, ninja32); |
| 207 | MODULE_VERSION(DRV_VERSION); | 199 | MODULE_VERSION(DRV_VERSION); |
| 208 | |||
| 209 | module_init(ninja32_init); | ||
| 210 | module_exit(ninja32_exit); | ||
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index 31d5986537a3..0c424dae56e7 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
| @@ -168,21 +168,10 @@ static struct pci_driver ns87410_pci_driver = { | |||
| 168 | #endif | 168 | #endif |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | static int __init ns87410_init(void) | 171 | module_pci_driver(ns87410_pci_driver); |
| 172 | { | ||
| 173 | return pci_register_driver(&ns87410_pci_driver); | ||
| 174 | } | ||
| 175 | |||
| 176 | static void __exit ns87410_exit(void) | ||
| 177 | { | ||
| 178 | pci_unregister_driver(&ns87410_pci_driver); | ||
| 179 | } | ||
| 180 | 172 | ||
| 181 | MODULE_AUTHOR("Alan Cox"); | 173 | MODULE_AUTHOR("Alan Cox"); |
| 182 | MODULE_DESCRIPTION("low-level driver for Nat Semi 87410"); | 174 | MODULE_DESCRIPTION("low-level driver for Nat Semi 87410"); |
| 183 | MODULE_LICENSE("GPL"); | 175 | MODULE_LICENSE("GPL"); |
| 184 | MODULE_DEVICE_TABLE(pci, ns87410); | 176 | MODULE_DEVICE_TABLE(pci, ns87410); |
| 185 | MODULE_VERSION(DRV_VERSION); | 177 | MODULE_VERSION(DRV_VERSION); |
| 186 | |||
| 187 | module_init(ns87410_init); | ||
| 188 | module_exit(ns87410_exit); | ||
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index f1d517bc5b49..6f6fa1060505 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c | |||
| @@ -414,18 +414,7 @@ static struct pci_driver ns87415_pci_driver = { | |||
| 414 | #endif | 414 | #endif |
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | static int __init ns87415_init(void) | 417 | module_pci_driver(ns87415_pci_driver); |
| 418 | { | ||
| 419 | return pci_register_driver(&ns87415_pci_driver); | ||
| 420 | } | ||
| 421 | |||
| 422 | static void __exit ns87415_exit(void) | ||
| 423 | { | ||
| 424 | pci_unregister_driver(&ns87415_pci_driver); | ||
| 425 | } | ||
| 426 | |||
| 427 | module_init(ns87415_init); | ||
| 428 | module_exit(ns87415_exit); | ||
| 429 | 418 | ||
| 430 | MODULE_AUTHOR("Alan Cox"); | 419 | MODULE_AUTHOR("Alan Cox"); |
| 431 | MODULE_DESCRIPTION("ATA low-level driver for NS87415 controllers"); | 420 | MODULE_DESCRIPTION("ATA low-level driver for NS87415 controllers"); |
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index 98cdf50e4065..d77b2e1054ef 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c | |||
| @@ -265,22 +265,10 @@ static struct pci_driver oldpiix_pci_driver = { | |||
| 265 | #endif | 265 | #endif |
| 266 | }; | 266 | }; |
| 267 | 267 | ||
| 268 | static int __init oldpiix_init(void) | 268 | module_pci_driver(oldpiix_pci_driver); |
| 269 | { | ||
| 270 | return pci_register_driver(&oldpiix_pci_driver); | ||
| 271 | } | ||
| 272 | |||
| 273 | static void __exit oldpiix_exit(void) | ||
| 274 | { | ||
| 275 | pci_unregister_driver(&oldpiix_pci_driver); | ||
| 276 | } | ||
| 277 | |||
| 278 | module_init(oldpiix_init); | ||
| 279 | module_exit(oldpiix_exit); | ||
| 280 | 269 | ||
| 281 | MODULE_AUTHOR("Alan Cox"); | 270 | MODULE_AUTHOR("Alan Cox"); |
| 282 | MODULE_DESCRIPTION("SCSI low-level driver for early PIIX series controllers"); | 271 | MODULE_DESCRIPTION("SCSI low-level driver for early PIIX series controllers"); |
| 283 | MODULE_LICENSE("GPL"); | 272 | MODULE_LICENSE("GPL"); |
| 284 | MODULE_DEVICE_TABLE(pci, oldpiix_pci_tbl); | 273 | MODULE_DEVICE_TABLE(pci, oldpiix_pci_tbl); |
| 285 | MODULE_VERSION(DRV_VERSION); | 274 | MODULE_VERSION(DRV_VERSION); |
| 286 | |||
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c index accc033faf77..4ea70cd22aee 100644 --- a/drivers/ata/pata_opti.c +++ b/drivers/ata/pata_opti.c | |||
| @@ -191,22 +191,10 @@ static struct pci_driver opti_pci_driver = { | |||
| 191 | #endif | 191 | #endif |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | static int __init opti_init(void) | 194 | module_pci_driver(opti_pci_driver); |
| 195 | { | ||
| 196 | return pci_register_driver(&opti_pci_driver); | ||
| 197 | } | ||
| 198 | |||
| 199 | static void __exit opti_exit(void) | ||
| 200 | { | ||
| 201 | pci_unregister_driver(&opti_pci_driver); | ||
| 202 | } | ||
| 203 | |||
| 204 | 195 | ||
| 205 | MODULE_AUTHOR("Alan Cox"); | 196 | MODULE_AUTHOR("Alan Cox"); |
| 206 | MODULE_DESCRIPTION("low-level driver for Opti 621/621X"); | 197 | MODULE_DESCRIPTION("low-level driver for Opti 621/621X"); |
| 207 | MODULE_LICENSE("GPL"); | 198 | MODULE_LICENSE("GPL"); |
| 208 | MODULE_DEVICE_TABLE(pci, opti); | 199 | MODULE_DEVICE_TABLE(pci, opti); |
| 209 | MODULE_VERSION(DRV_VERSION); | 200 | MODULE_VERSION(DRV_VERSION); |
| 210 | |||
| 211 | module_init(opti_init); | ||
| 212 | module_exit(opti_exit); | ||
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index 77cb91408632..78ede3fd1875 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
| @@ -447,21 +447,10 @@ static struct pci_driver optidma_pci_driver = { | |||
| 447 | #endif | 447 | #endif |
| 448 | }; | 448 | }; |
| 449 | 449 | ||
| 450 | static int __init optidma_init(void) | 450 | module_pci_driver(optidma_pci_driver); |
| 451 | { | ||
| 452 | return pci_register_driver(&optidma_pci_driver); | ||
| 453 | } | ||
| 454 | |||
| 455 | static void __exit optidma_exit(void) | ||
| 456 | { | ||
| 457 | pci_unregister_driver(&optidma_pci_driver); | ||
| 458 | } | ||
| 459 | 451 | ||
| 460 | MODULE_AUTHOR("Alan Cox"); | 452 | MODULE_AUTHOR("Alan Cox"); |
| 461 | MODULE_DESCRIPTION("low-level driver for Opti Firestar/Firestar Plus"); | 453 | MODULE_DESCRIPTION("low-level driver for Opti Firestar/Firestar Plus"); |
| 462 | MODULE_LICENSE("GPL"); | 454 | MODULE_LICENSE("GPL"); |
| 463 | MODULE_DEVICE_TABLE(pci, optidma); | 455 | MODULE_DEVICE_TABLE(pci, optidma); |
| 464 | MODULE_VERSION(DRV_VERSION); | 456 | MODULE_VERSION(DRV_VERSION); |
| 465 | |||
| 466 | module_init(optidma_init); | ||
| 467 | module_exit(optidma_exit); | ||
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index a808ba03bd7f..958238dda8fc 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
| @@ -170,7 +170,8 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) | |||
| 170 | { | 170 | { |
| 171 | int *is_kme = priv_data; | 171 | int *is_kme = priv_data; |
| 172 | 172 | ||
| 173 | if (!(pdev->resource[0]->flags & IO_DATA_PATH_WIDTH_8)) { | 173 | if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH) |
| 174 | != IO_DATA_PATH_WIDTH_8) { | ||
| 174 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | 175 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
| 175 | pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 176 | pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
| 176 | } | 177 | } |
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 7d63f24179c7..c9399c8688c5 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
| @@ -784,21 +784,4 @@ static int pdc2027x_reinit_one(struct pci_dev *pdev) | |||
| 784 | } | 784 | } |
| 785 | #endif | 785 | #endif |
| 786 | 786 | ||
| 787 | /** | 787 | module_pci_driver(pdc2027x_pci_driver); |
| 788 | * pdc2027x_init - Called after this module is loaded into the kernel. | ||
| 789 | */ | ||
| 790 | static int __init pdc2027x_init(void) | ||
| 791 | { | ||
| 792 | return pci_register_driver(&pdc2027x_pci_driver); | ||
| 793 | } | ||
| 794 | |||
| 795 | /** | ||
| 796 | * pdc2027x_exit - Called before this module unloaded from the kernel | ||
| 797 | */ | ||
| 798 | static void __exit pdc2027x_exit(void) | ||
| 799 | { | ||
| 800 | pci_unregister_driver(&pdc2027x_pci_driver); | ||
| 801 | } | ||
| 802 | |||
| 803 | module_init(pdc2027x_init); | ||
| 804 | module_exit(pdc2027x_exit); | ||
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index c2ed5868dda6..c34fc50070a6 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
| @@ -384,21 +384,10 @@ static struct pci_driver pdc202xx_pci_driver = { | |||
| 384 | #endif | 384 | #endif |
| 385 | }; | 385 | }; |
| 386 | 386 | ||
| 387 | static int __init pdc202xx_init(void) | 387 | module_pci_driver(pdc202xx_pci_driver); |
| 388 | { | ||
| 389 | return pci_register_driver(&pdc202xx_pci_driver); | ||
| 390 | } | ||
| 391 | |||
| 392 | static void __exit pdc202xx_exit(void) | ||
| 393 | { | ||
| 394 | pci_unregister_driver(&pdc202xx_pci_driver); | ||
| 395 | } | ||
| 396 | 388 | ||
| 397 | MODULE_AUTHOR("Alan Cox"); | 389 | MODULE_AUTHOR("Alan Cox"); |
| 398 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); | 390 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); |
| 399 | MODULE_LICENSE("GPL"); | 391 | MODULE_LICENSE("GPL"); |
| 400 | MODULE_DEVICE_TABLE(pci, pdc202xx); | 392 | MODULE_DEVICE_TABLE(pci, pdc202xx); |
| 401 | MODULE_VERSION(DRV_VERSION); | 393 | MODULE_VERSION(DRV_VERSION); |
| 402 | |||
| 403 | module_init(pdc202xx_init); | ||
| 404 | module_exit(pdc202xx_exit); | ||
diff --git a/drivers/ata/pata_piccolo.c b/drivers/ata/pata_piccolo.c index cb01bf9496fe..2beb6b5045f8 100644 --- a/drivers/ata/pata_piccolo.c +++ b/drivers/ata/pata_piccolo.c | |||
| @@ -117,24 +117,10 @@ static struct pci_driver ata_tosh_pci_driver = { | |||
| 117 | #endif | 117 | #endif |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | static int __init ata_tosh_init(void) | 120 | module_pci_driver(ata_tosh_pci_driver); |
| 121 | { | ||
| 122 | return pci_register_driver(&ata_tosh_pci_driver); | ||
| 123 | } | ||
| 124 | |||
| 125 | |||
| 126 | static void __exit ata_tosh_exit(void) | ||
| 127 | { | ||
| 128 | pci_unregister_driver(&ata_tosh_pci_driver); | ||
| 129 | } | ||
| 130 | |||
| 131 | 121 | ||
| 132 | MODULE_AUTHOR("Alan Cox"); | 122 | MODULE_AUTHOR("Alan Cox"); |
| 133 | MODULE_DESCRIPTION("Low level driver for Toshiba Piccolo ATA"); | 123 | MODULE_DESCRIPTION("Low level driver for Toshiba Piccolo ATA"); |
| 134 | MODULE_LICENSE("GPL"); | 124 | MODULE_LICENSE("GPL"); |
| 135 | MODULE_DEVICE_TABLE(pci, ata_tosh); | 125 | MODULE_DEVICE_TABLE(pci, ata_tosh); |
| 136 | MODULE_VERSION(DRV_VERSION); | 126 | MODULE_VERSION(DRV_VERSION); |
| 137 | |||
| 138 | module_init(ata_tosh_init); | ||
| 139 | module_exit(ata_tosh_exit); | ||
| 140 | |||
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index b2d3a2bb4e60..f582ba180a7d 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c | |||
| @@ -244,22 +244,10 @@ static struct pci_driver radisys_pci_driver = { | |||
| 244 | #endif | 244 | #endif |
| 245 | }; | 245 | }; |
| 246 | 246 | ||
| 247 | static int __init radisys_init(void) | 247 | module_pci_driver(radisys_pci_driver); |
| 248 | { | ||
| 249 | return pci_register_driver(&radisys_pci_driver); | ||
| 250 | } | ||
| 251 | |||
| 252 | static void __exit radisys_exit(void) | ||
| 253 | { | ||
| 254 | pci_unregister_driver(&radisys_pci_driver); | ||
| 255 | } | ||
| 256 | |||
| 257 | module_init(radisys_init); | ||
| 258 | module_exit(radisys_exit); | ||
| 259 | 248 | ||
| 260 | MODULE_AUTHOR("Alan Cox"); | 249 | MODULE_AUTHOR("Alan Cox"); |
| 261 | MODULE_DESCRIPTION("SCSI low-level driver for Radisys R82600 controllers"); | 250 | MODULE_DESCRIPTION("SCSI low-level driver for Radisys R82600 controllers"); |
| 262 | MODULE_LICENSE("GPL"); | 251 | MODULE_LICENSE("GPL"); |
| 263 | MODULE_DEVICE_TABLE(pci, radisys_pci_tbl); | 252 | MODULE_DEVICE_TABLE(pci, radisys_pci_tbl); |
| 264 | MODULE_VERSION(DRV_VERSION); | 253 | MODULE_VERSION(DRV_VERSION); |
| 265 | |||
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index e6a2dd7809c1..32a3499e83e7 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c | |||
| @@ -394,18 +394,7 @@ static struct pci_driver rdc_pci_driver = { | |||
| 394 | }; | 394 | }; |
| 395 | 395 | ||
| 396 | 396 | ||
| 397 | static int __init rdc_init(void) | 397 | module_pci_driver(rdc_pci_driver); |
| 398 | { | ||
| 399 | return pci_register_driver(&rdc_pci_driver); | ||
| 400 | } | ||
| 401 | |||
| 402 | static void __exit rdc_exit(void) | ||
| 403 | { | ||
| 404 | pci_unregister_driver(&rdc_pci_driver); | ||
| 405 | } | ||
| 406 | |||
| 407 | module_init(rdc_init); | ||
| 408 | module_exit(rdc_exit); | ||
| 409 | 398 | ||
| 410 | MODULE_AUTHOR("Alan Cox (based on ata_piix)"); | 399 | MODULE_AUTHOR("Alan Cox (based on ata_piix)"); |
| 411 | MODULE_DESCRIPTION("SCSI low-level driver for RDC PATA controllers"); | 400 | MODULE_DESCRIPTION("SCSI low-level driver for RDC PATA controllers"); |
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index aca321e1e6a2..60f4de2dd47d 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
| @@ -140,22 +140,10 @@ static struct pci_driver rz1000_pci_driver = { | |||
| 140 | #endif | 140 | #endif |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | static int __init rz1000_init(void) | 143 | module_pci_driver(rz1000_pci_driver); |
| 144 | { | ||
| 145 | return pci_register_driver(&rz1000_pci_driver); | ||
| 146 | } | ||
| 147 | |||
| 148 | static void __exit rz1000_exit(void) | ||
| 149 | { | ||
| 150 | pci_unregister_driver(&rz1000_pci_driver); | ||
| 151 | } | ||
| 152 | 144 | ||
| 153 | MODULE_AUTHOR("Alan Cox"); | 145 | MODULE_AUTHOR("Alan Cox"); |
| 154 | MODULE_DESCRIPTION("low-level driver for RZ1000 PCI ATA"); | 146 | MODULE_DESCRIPTION("low-level driver for RZ1000 PCI ATA"); |
| 155 | MODULE_LICENSE("GPL"); | 147 | MODULE_LICENSE("GPL"); |
| 156 | MODULE_DEVICE_TABLE(pci, pata_rz1000); | 148 | MODULE_DEVICE_TABLE(pci, pata_rz1000); |
| 157 | MODULE_VERSION(DRV_VERSION); | 149 | MODULE_VERSION(DRV_VERSION); |
| 158 | |||
| 159 | module_init(rz1000_init); | ||
| 160 | module_exit(rz1000_exit); | ||
| 161 | |||
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index c0e603a84f7f..ce2f828c17b3 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
| @@ -261,21 +261,10 @@ static struct pci_driver sc1200_pci_driver = { | |||
| 261 | #endif | 261 | #endif |
| 262 | }; | 262 | }; |
| 263 | 263 | ||
| 264 | static int __init sc1200_init(void) | 264 | module_pci_driver(sc1200_pci_driver); |
| 265 | { | ||
| 266 | return pci_register_driver(&sc1200_pci_driver); | ||
| 267 | } | ||
| 268 | |||
| 269 | static void __exit sc1200_exit(void) | ||
| 270 | { | ||
| 271 | pci_unregister_driver(&sc1200_pci_driver); | ||
| 272 | } | ||
| 273 | 265 | ||
| 274 | MODULE_AUTHOR("Alan Cox, Mark Lord"); | 266 | MODULE_AUTHOR("Alan Cox, Mark Lord"); |
| 275 | MODULE_DESCRIPTION("low-level driver for the NS/AMD SC1200"); | 267 | MODULE_DESCRIPTION("low-level driver for the NS/AMD SC1200"); |
| 276 | MODULE_LICENSE("GPL"); | 268 | MODULE_LICENSE("GPL"); |
| 277 | MODULE_DEVICE_TABLE(pci, sc1200); | 269 | MODULE_DEVICE_TABLE(pci, sc1200); |
| 278 | MODULE_VERSION(DRV_VERSION); | 270 | MODULE_VERSION(DRV_VERSION); |
| 279 | |||
| 280 | module_init(sc1200_init); | ||
| 281 | module_exit(sc1200_exit); | ||
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index e265f835c95d..f35f15f4d83e 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
| @@ -1103,26 +1103,7 @@ static struct pci_driver scc_pci_driver = { | |||
| 1103 | #endif | 1103 | #endif |
| 1104 | }; | 1104 | }; |
| 1105 | 1105 | ||
| 1106 | static int __init scc_init (void) | 1106 | module_pci_driver(scc_pci_driver); |
| 1107 | { | ||
| 1108 | int rc; | ||
| 1109 | |||
| 1110 | DPRINTK("pci_register_driver\n"); | ||
| 1111 | rc = pci_register_driver(&scc_pci_driver); | ||
| 1112 | if (rc) | ||
| 1113 | return rc; | ||
| 1114 | |||
| 1115 | DPRINTK("done\n"); | ||
| 1116 | return 0; | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | static void __exit scc_exit (void) | ||
| 1120 | { | ||
| 1121 | pci_unregister_driver(&scc_pci_driver); | ||
| 1122 | } | ||
| 1123 | |||
| 1124 | module_init(scc_init); | ||
| 1125 | module_exit(scc_exit); | ||
| 1126 | 1107 | ||
| 1127 | MODULE_AUTHOR("Toshiba corp"); | 1108 | MODULE_AUTHOR("Toshiba corp"); |
| 1128 | MODULE_DESCRIPTION("SCSI low-level driver for Toshiba SCC PATA controller"); | 1109 | MODULE_DESCRIPTION("SCSI low-level driver for Toshiba SCC PATA controller"); |
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index 7c78b9993627..db0d18cf1c2a 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c | |||
| @@ -179,15 +179,4 @@ static int __devinit sch_init_one(struct pci_dev *pdev, | |||
| 179 | return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0); | 179 | return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | static int __init sch_init(void) | 182 | module_pci_driver(sch_pci_driver); |
| 183 | { | ||
| 184 | return pci_register_driver(&sch_pci_driver); | ||
| 185 | } | ||
| 186 | |||
| 187 | static void __exit sch_exit(void) | ||
| 188 | { | ||
| 189 | pci_unregister_driver(&sch_pci_driver); | ||
| 190 | } | ||
| 191 | |||
| 192 | module_init(sch_init); | ||
| 193 | module_exit(sch_exit); | ||
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c index 71eaf385e970..f3febbce6c46 100644 --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c | |||
| @@ -475,21 +475,10 @@ static struct pci_driver serverworks_pci_driver = { | |||
| 475 | #endif | 475 | #endif |
| 476 | }; | 476 | }; |
| 477 | 477 | ||
| 478 | static int __init serverworks_init(void) | 478 | module_pci_driver(serverworks_pci_driver); |
| 479 | { | ||
| 480 | return pci_register_driver(&serverworks_pci_driver); | ||
| 481 | } | ||
| 482 | |||
| 483 | static void __exit serverworks_exit(void) | ||
| 484 | { | ||
| 485 | pci_unregister_driver(&serverworks_pci_driver); | ||
| 486 | } | ||
| 487 | 479 | ||
| 488 | MODULE_AUTHOR("Alan Cox"); | 480 | MODULE_AUTHOR("Alan Cox"); |
| 489 | MODULE_DESCRIPTION("low-level driver for Serverworks OSB4/CSB5/CSB6"); | 481 | MODULE_DESCRIPTION("low-level driver for Serverworks OSB4/CSB5/CSB6"); |
| 490 | MODULE_LICENSE("GPL"); | 482 | MODULE_LICENSE("GPL"); |
| 491 | MODULE_DEVICE_TABLE(pci, serverworks); | 483 | MODULE_DEVICE_TABLE(pci, serverworks); |
| 492 | MODULE_VERSION(DRV_VERSION); | 484 | MODULE_VERSION(DRV_VERSION); |
| 493 | |||
| 494 | module_init(serverworks_init); | ||
| 495 | module_exit(serverworks_exit); | ||
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index b92eacf8dd3c..5cfdf94823d0 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
| @@ -437,21 +437,10 @@ static struct pci_driver sil680_pci_driver = { | |||
| 437 | #endif | 437 | #endif |
| 438 | }; | 438 | }; |
| 439 | 439 | ||
| 440 | static int __init sil680_init(void) | 440 | module_pci_driver(sil680_pci_driver); |
| 441 | { | ||
| 442 | return pci_register_driver(&sil680_pci_driver); | ||
| 443 | } | ||
| 444 | |||
| 445 | static void __exit sil680_exit(void) | ||
| 446 | { | ||
| 447 | pci_unregister_driver(&sil680_pci_driver); | ||
| 448 | } | ||
| 449 | 441 | ||
| 450 | MODULE_AUTHOR("Alan Cox"); | 442 | MODULE_AUTHOR("Alan Cox"); |
| 451 | MODULE_DESCRIPTION("low-level driver for SI680 PATA"); | 443 | MODULE_DESCRIPTION("low-level driver for SI680 PATA"); |
| 452 | MODULE_LICENSE("GPL"); | 444 | MODULE_LICENSE("GPL"); |
| 453 | MODULE_DEVICE_TABLE(pci, sil680); | 445 | MODULE_DEVICE_TABLE(pci, sil680); |
| 454 | MODULE_VERSION(DRV_VERSION); | 446 | MODULE_VERSION(DRV_VERSION); |
| 455 | |||
| 456 | module_init(sil680_init); | ||
| 457 | module_exit(sil680_exit); | ||
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index b0edc7de7b2d..2d5ac1361262 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
| @@ -906,22 +906,10 @@ static struct pci_driver sis_pci_driver = { | |||
| 906 | #endif | 906 | #endif |
| 907 | }; | 907 | }; |
| 908 | 908 | ||
| 909 | static int __init sis_init(void) | 909 | module_pci_driver(sis_pci_driver); |
| 910 | { | ||
| 911 | return pci_register_driver(&sis_pci_driver); | ||
| 912 | } | ||
| 913 | |||
| 914 | static void __exit sis_exit(void) | ||
| 915 | { | ||
| 916 | pci_unregister_driver(&sis_pci_driver); | ||
| 917 | } | ||
| 918 | |||
| 919 | module_init(sis_init); | ||
| 920 | module_exit(sis_exit); | ||
| 921 | 910 | ||
| 922 | MODULE_AUTHOR("Alan Cox"); | 911 | MODULE_AUTHOR("Alan Cox"); |
| 923 | MODULE_DESCRIPTION("SCSI low-level driver for SiS ATA"); | 912 | MODULE_DESCRIPTION("SCSI low-level driver for SiS ATA"); |
| 924 | MODULE_LICENSE("GPL"); | 913 | MODULE_LICENSE("GPL"); |
| 925 | MODULE_DEVICE_TABLE(pci, sis_pci_tbl); | 914 | MODULE_DEVICE_TABLE(pci, sis_pci_tbl); |
| 926 | MODULE_VERSION(DRV_VERSION); | 915 | MODULE_VERSION(DRV_VERSION); |
| 927 | |||
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 24cf200dd1c9..738e000107d6 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c | |||
| @@ -372,21 +372,10 @@ static struct pci_driver sl82c105_pci_driver = { | |||
| 372 | #endif | 372 | #endif |
| 373 | }; | 373 | }; |
| 374 | 374 | ||
| 375 | static int __init sl82c105_init(void) | 375 | module_pci_driver(sl82c105_pci_driver); |
| 376 | { | ||
| 377 | return pci_register_driver(&sl82c105_pci_driver); | ||
| 378 | } | ||
| 379 | |||
| 380 | static void __exit sl82c105_exit(void) | ||
| 381 | { | ||
| 382 | pci_unregister_driver(&sl82c105_pci_driver); | ||
| 383 | } | ||
| 384 | 376 | ||
| 385 | MODULE_AUTHOR("Alan Cox"); | 377 | MODULE_AUTHOR("Alan Cox"); |
| 386 | MODULE_DESCRIPTION("low-level driver for Sl82c105"); | 378 | MODULE_DESCRIPTION("low-level driver for Sl82c105"); |
| 387 | MODULE_LICENSE("GPL"); | 379 | MODULE_LICENSE("GPL"); |
| 388 | MODULE_DEVICE_TABLE(pci, sl82c105); | 380 | MODULE_DEVICE_TABLE(pci, sl82c105); |
| 389 | MODULE_VERSION(DRV_VERSION); | 381 | MODULE_VERSION(DRV_VERSION); |
| 390 | |||
| 391 | module_init(sl82c105_init); | ||
| 392 | module_exit(sl82c105_exit); | ||
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 28da1c6becf1..c8e589d91231 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
| @@ -240,21 +240,10 @@ static struct pci_driver triflex_pci_driver = { | |||
| 240 | #endif | 240 | #endif |
| 241 | }; | 241 | }; |
| 242 | 242 | ||
| 243 | static int __init triflex_init(void) | 243 | module_pci_driver(triflex_pci_driver); |
| 244 | { | ||
| 245 | return pci_register_driver(&triflex_pci_driver); | ||
| 246 | } | ||
| 247 | |||
| 248 | static void __exit triflex_exit(void) | ||
| 249 | { | ||
| 250 | pci_unregister_driver(&triflex_pci_driver); | ||
| 251 | } | ||
| 252 | 244 | ||
| 253 | MODULE_AUTHOR("Alan Cox"); | 245 | MODULE_AUTHOR("Alan Cox"); |
| 254 | MODULE_DESCRIPTION("low-level driver for Compaq Triflex"); | 246 | MODULE_DESCRIPTION("low-level driver for Compaq Triflex"); |
| 255 | MODULE_LICENSE("GPL"); | 247 | MODULE_LICENSE("GPL"); |
| 256 | MODULE_DEVICE_TABLE(pci, triflex); | 248 | MODULE_DEVICE_TABLE(pci, triflex); |
| 257 | MODULE_VERSION(DRV_VERSION); | 249 | MODULE_VERSION(DRV_VERSION); |
| 258 | |||
| 259 | module_init(triflex_init); | ||
| 260 | module_exit(triflex_exit); | ||
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 255f336cd7ea..8d2a9fdf6b8d 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
| @@ -711,21 +711,10 @@ static struct pci_driver via_pci_driver = { | |||
| 711 | #endif | 711 | #endif |
| 712 | }; | 712 | }; |
| 713 | 713 | ||
| 714 | static int __init via_init(void) | 714 | module_pci_driver(via_pci_driver); |
| 715 | { | ||
| 716 | return pci_register_driver(&via_pci_driver); | ||
| 717 | } | ||
| 718 | |||
| 719 | static void __exit via_exit(void) | ||
| 720 | { | ||
| 721 | pci_unregister_driver(&via_pci_driver); | ||
| 722 | } | ||
| 723 | 715 | ||
| 724 | MODULE_AUTHOR("Alan Cox"); | 716 | MODULE_AUTHOR("Alan Cox"); |
| 725 | MODULE_DESCRIPTION("low-level driver for VIA PATA"); | 717 | MODULE_DESCRIPTION("low-level driver for VIA PATA"); |
| 726 | MODULE_LICENSE("GPL"); | 718 | MODULE_LICENSE("GPL"); |
| 727 | MODULE_DEVICE_TABLE(pci, via); | 719 | MODULE_DEVICE_TABLE(pci, via); |
| 728 | MODULE_VERSION(DRV_VERSION); | 720 | MODULE_VERSION(DRV_VERSION); |
| 729 | |||
| 730 | module_init(via_init); | ||
| 731 | module_exit(via_exit); | ||
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 04911d52f59d..505333340ad5 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
| @@ -660,21 +660,10 @@ static int adma_ata_init_one(struct pci_dev *pdev, | |||
| 660 | &adma_ata_sht); | 660 | &adma_ata_sht); |
| 661 | } | 661 | } |
| 662 | 662 | ||
| 663 | static int __init adma_ata_init(void) | 663 | module_pci_driver(adma_ata_pci_driver); |
| 664 | { | ||
| 665 | return pci_register_driver(&adma_ata_pci_driver); | ||
| 666 | } | ||
| 667 | |||
| 668 | static void __exit adma_ata_exit(void) | ||
| 669 | { | ||
| 670 | pci_unregister_driver(&adma_ata_pci_driver); | ||
| 671 | } | ||
| 672 | 664 | ||
| 673 | MODULE_AUTHOR("Mark Lord"); | 665 | MODULE_AUTHOR("Mark Lord"); |
| 674 | MODULE_DESCRIPTION("Pacific Digital Corporation ADMA low-level driver"); | 666 | MODULE_DESCRIPTION("Pacific Digital Corporation ADMA low-level driver"); |
| 675 | MODULE_LICENSE("GPL"); | 667 | MODULE_LICENSE("GPL"); |
| 676 | MODULE_DEVICE_TABLE(pci, adma_ata_pci_tbl); | 668 | MODULE_DEVICE_TABLE(pci, adma_ata_pci_tbl); |
| 677 | MODULE_VERSION(DRV_VERSION); | 669 | MODULE_VERSION(DRV_VERSION); |
| 678 | |||
| 679 | module_init(adma_ata_init); | ||
| 680 | module_exit(adma_ata_exit); | ||
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 69f7cde49c6b..937aeb34b310 100644..100755 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
| @@ -158,6 +158,7 @@ enum { | |||
| 158 | /* Assign HW handshaking interface (x) to destination / source peripheral */ | 158 | /* Assign HW handshaking interface (x) to destination / source peripheral */ |
| 159 | #define DMA_CFG_HW_HS_DEST(int_num) (((int_num) & 0xF) << 11) | 159 | #define DMA_CFG_HW_HS_DEST(int_num) (((int_num) & 0xF) << 11) |
| 160 | #define DMA_CFG_HW_HS_SRC(int_num) (((int_num) & 0xF) << 7) | 160 | #define DMA_CFG_HW_HS_SRC(int_num) (((int_num) & 0xF) << 7) |
| 161 | #define DMA_CFG_HW_CH_PRIOR(int_num) (((int_num) & 0xF) << 5) | ||
| 161 | #define DMA_LLP_LMS(addr, master) (((addr) & 0xfffffffc) | (master)) | 162 | #define DMA_LLP_LMS(addr, master) (((addr) & 0xfffffffc) | (master)) |
| 162 | 163 | ||
| 163 | /* | 164 | /* |
| @@ -318,6 +319,7 @@ struct sata_dwc_host_priv { | |||
| 318 | u32 dma_interrupt_count; | 319 | u32 dma_interrupt_count; |
| 319 | struct ahb_dma_regs *sata_dma_regs; | 320 | struct ahb_dma_regs *sata_dma_regs; |
| 320 | struct device *dwc_dev; | 321 | struct device *dwc_dev; |
| 322 | int dma_channel; | ||
| 321 | }; | 323 | }; |
| 322 | struct sata_dwc_host_priv host_pvt; | 324 | struct sata_dwc_host_priv host_pvt; |
| 323 | /* | 325 | /* |
| @@ -437,15 +439,12 @@ static void clear_chan_interrupts(int c) | |||
| 437 | */ | 439 | */ |
| 438 | static int dma_request_channel(void) | 440 | static int dma_request_channel(void) |
| 439 | { | 441 | { |
| 440 | int i; | 442 | /* Check if the channel is not currently in use */ |
| 441 | 443 | if (!(in_le32(&(host_pvt.sata_dma_regs->dma_chan_en.low)) & | |
| 442 | for (i = 0; i < DMA_NUM_CHANS; i++) { | 444 | DMA_CHANNEL(host_pvt.dma_channel))) |
| 443 | if (!(in_le32(&(host_pvt.sata_dma_regs->dma_chan_en.low)) &\ | 445 | return host_pvt.dma_channel; |
| 444 | DMA_CHANNEL(i))) | 446 | dev_err(host_pvt.dwc_dev, "%s Channel %d is currently in use\n", |
| 445 | return i; | 447 | __func__, host_pvt.dma_channel); |
| 446 | } | ||
| 447 | dev_err(host_pvt.dwc_dev, "%s NO channel chan_en: 0x%08x\n", __func__, | ||
| 448 | in_le32(&(host_pvt.sata_dma_regs->dma_chan_en.low))); | ||
| 449 | return -1; | 448 | return -1; |
| 450 | } | 449 | } |
| 451 | 450 | ||
| @@ -481,7 +480,8 @@ static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance) | |||
| 481 | dev_dbg(ap->dev, "eot=0x%08x err=0x%08x pending=%d active port=%d\n", | 480 | dev_dbg(ap->dev, "eot=0x%08x err=0x%08x pending=%d active port=%d\n", |
| 482 | tfr_reg, err_reg, hsdevp->dma_pending[tag], port); | 481 | tfr_reg, err_reg, hsdevp->dma_pending[tag], port); |
| 483 | 482 | ||
| 484 | for (chan = 0; chan < DMA_NUM_CHANS; chan++) { | 483 | chan = host_pvt.dma_channel; |
| 484 | if (chan >= 0) { | ||
| 485 | /* Check for end-of-transfer interrupt. */ | 485 | /* Check for end-of-transfer interrupt. */ |
| 486 | if (tfr_reg & DMA_CHANNEL(chan)) { | 486 | if (tfr_reg & DMA_CHANNEL(chan)) { |
| 487 | /* | 487 | /* |
| @@ -534,9 +534,9 @@ static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance) | |||
| 534 | static int dma_request_interrupts(struct sata_dwc_device *hsdev, int irq) | 534 | static int dma_request_interrupts(struct sata_dwc_device *hsdev, int irq) |
| 535 | { | 535 | { |
| 536 | int retval = 0; | 536 | int retval = 0; |
| 537 | int chan; | 537 | int chan = host_pvt.dma_channel; |
| 538 | 538 | ||
| 539 | for (chan = 0; chan < DMA_NUM_CHANS; chan++) { | 539 | if (chan >= 0) { |
| 540 | /* Unmask error interrupt */ | 540 | /* Unmask error interrupt */ |
| 541 | out_le32(&(host_pvt.sata_dma_regs)->interrupt_mask.error.low, | 541 | out_le32(&(host_pvt.sata_dma_regs)->interrupt_mask.error.low, |
| 542 | DMA_ENABLE_CHAN(chan)); | 542 | DMA_ENABLE_CHAN(chan)); |
| @@ -575,7 +575,10 @@ static int map_sg_to_lli(struct scatterlist *sg, int num_elems, | |||
| 575 | int fis_len = 0; | 575 | int fis_len = 0; |
| 576 | dma_addr_t next_llp; | 576 | dma_addr_t next_llp; |
| 577 | int bl; | 577 | int bl; |
| 578 | int sms_val, dms_val; | ||
| 578 | 579 | ||
| 580 | sms_val = 0; | ||
| 581 | dms_val = 1 + host_pvt.dma_channel; | ||
| 579 | dev_dbg(host_pvt.dwc_dev, "%s: sg=%p nelem=%d lli=%p dma_lli=0x%08x" | 582 | dev_dbg(host_pvt.dwc_dev, "%s: sg=%p nelem=%d lli=%p dma_lli=0x%08x" |
| 580 | " dmadr=0x%08x\n", __func__, sg, num_elems, lli, (u32)dma_lli, | 583 | " dmadr=0x%08x\n", __func__, sg, num_elems, lli, (u32)dma_lli, |
| 581 | (u32)dmadr_addr); | 584 | (u32)dmadr_addr); |
| @@ -635,8 +638,8 @@ static int map_sg_to_lli(struct scatterlist *sg, int num_elems, | |||
| 635 | 638 | ||
| 636 | lli[idx].ctl.low = cpu_to_le32( | 639 | lli[idx].ctl.low = cpu_to_le32( |
| 637 | DMA_CTL_TTFC(DMA_CTL_TTFC_P2M_DMAC) | | 640 | DMA_CTL_TTFC(DMA_CTL_TTFC_P2M_DMAC) | |
| 638 | DMA_CTL_SMS(0) | | 641 | DMA_CTL_SMS(sms_val) | |
| 639 | DMA_CTL_DMS(1) | | 642 | DMA_CTL_DMS(dms_val) | |
| 640 | DMA_CTL_SRC_MSIZE(bl) | | 643 | DMA_CTL_SRC_MSIZE(bl) | |
| 641 | DMA_CTL_DST_MSIZE(bl) | | 644 | DMA_CTL_DST_MSIZE(bl) | |
| 642 | DMA_CTL_SINC_NOCHANGE | | 645 | DMA_CTL_SINC_NOCHANGE | |
| @@ -651,8 +654,8 @@ static int map_sg_to_lli(struct scatterlist *sg, int num_elems, | |||
| 651 | 654 | ||
| 652 | lli[idx].ctl.low = cpu_to_le32( | 655 | lli[idx].ctl.low = cpu_to_le32( |
| 653 | DMA_CTL_TTFC(DMA_CTL_TTFC_M2P_PER) | | 656 | DMA_CTL_TTFC(DMA_CTL_TTFC_M2P_PER) | |
| 654 | DMA_CTL_SMS(1) | | 657 | DMA_CTL_SMS(dms_val) | |
| 655 | DMA_CTL_DMS(0) | | 658 | DMA_CTL_DMS(sms_val) | |
| 656 | DMA_CTL_SRC_MSIZE(bl) | | 659 | DMA_CTL_SRC_MSIZE(bl) | |
| 657 | DMA_CTL_DST_MSIZE(bl) | | 660 | DMA_CTL_DST_MSIZE(bl) | |
| 658 | DMA_CTL_DINC_NOCHANGE | | 661 | DMA_CTL_DINC_NOCHANGE | |
| @@ -744,8 +747,10 @@ static int dma_dwc_xfer_setup(struct scatterlist *sg, int num_elems, | |||
| 744 | 747 | ||
| 745 | /* Program the CFG register. */ | 748 | /* Program the CFG register. */ |
| 746 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].cfg.high), | 749 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].cfg.high), |
| 750 | DMA_CFG_HW_HS_SRC(dma_ch) | DMA_CFG_HW_HS_DEST(dma_ch) | | ||
| 747 | DMA_CFG_PROTCTL | DMA_CFG_FCMOD_REQ); | 751 | DMA_CFG_PROTCTL | DMA_CFG_FCMOD_REQ); |
| 748 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].cfg.low), 0); | 752 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].cfg.low), |
| 753 | DMA_CFG_HW_CH_PRIOR(dma_ch)); | ||
| 749 | 754 | ||
| 750 | /* Program the address of the linked list */ | 755 | /* Program the address of the linked list */ |
| 751 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].llp.low), | 756 | out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].llp.low), |
| @@ -1581,10 +1586,31 @@ static void sata_dwc_qc_prep(struct ata_queued_cmd *qc) | |||
| 1581 | 1586 | ||
| 1582 | static void sata_dwc_error_handler(struct ata_port *ap) | 1587 | static void sata_dwc_error_handler(struct ata_port *ap) |
| 1583 | { | 1588 | { |
| 1584 | ap->link.flags |= ATA_LFLAG_NO_HRST; | ||
| 1585 | ata_sff_error_handler(ap); | 1589 | ata_sff_error_handler(ap); |
| 1586 | } | 1590 | } |
| 1587 | 1591 | ||
| 1592 | int sata_dwc_hardreset(struct ata_link *link, unsigned int *class, | ||
| 1593 | unsigned long deadline) | ||
| 1594 | { | ||
| 1595 | struct sata_dwc_device *hsdev = HSDEV_FROM_AP(link->ap); | ||
| 1596 | int ret; | ||
| 1597 | |||
| 1598 | ret = sata_sff_hardreset(link, class, deadline); | ||
| 1599 | |||
| 1600 | sata_dwc_enable_interrupts(hsdev); | ||
| 1601 | |||
| 1602 | /* Reconfigure the DMA control register */ | ||
| 1603 | out_le32(&hsdev->sata_dwc_regs->dmacr, | ||
| 1604 | SATA_DWC_DMACR_TXRXCH_CLEAR); | ||
| 1605 | |||
| 1606 | /* Reconfigure the DMA Burst Transaction Size register */ | ||
| 1607 | out_le32(&hsdev->sata_dwc_regs->dbtsr, | ||
| 1608 | SATA_DWC_DBTSR_MWR(AHB_DMA_BRST_DFLT) | | ||
| 1609 | SATA_DWC_DBTSR_MRD(AHB_DMA_BRST_DFLT)); | ||
| 1610 | |||
| 1611 | return ret; | ||
| 1612 | } | ||
| 1613 | |||
| 1588 | /* | 1614 | /* |
| 1589 | * scsi mid-layer and libata interface structures | 1615 | * scsi mid-layer and libata interface structures |
| 1590 | */ | 1616 | */ |
| @@ -1604,6 +1630,7 @@ static struct ata_port_operations sata_dwc_ops = { | |||
| 1604 | .inherits = &ata_sff_port_ops, | 1630 | .inherits = &ata_sff_port_ops, |
| 1605 | 1631 | ||
| 1606 | .error_handler = sata_dwc_error_handler, | 1632 | .error_handler = sata_dwc_error_handler, |
| 1633 | .hardreset = sata_dwc_hardreset, | ||
| 1607 | 1634 | ||
| 1608 | .qc_prep = sata_dwc_qc_prep, | 1635 | .qc_prep = sata_dwc_qc_prep, |
| 1609 | .qc_issue = sata_dwc_qc_issue, | 1636 | .qc_issue = sata_dwc_qc_issue, |
| @@ -1638,6 +1665,8 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1638 | struct ata_host *host; | 1665 | struct ata_host *host; |
| 1639 | struct ata_port_info pi = sata_dwc_port_info[0]; | 1666 | struct ata_port_info pi = sata_dwc_port_info[0]; |
| 1640 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 1667 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
| 1668 | struct device_node *np = ofdev->dev.of_node; | ||
| 1669 | u32 dma_chan; | ||
| 1641 | 1670 | ||
| 1642 | /* Allocate DWC SATA device */ | 1671 | /* Allocate DWC SATA device */ |
| 1643 | hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); | 1672 | hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); |
| @@ -1647,6 +1676,13 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1647 | goto error; | 1676 | goto error; |
| 1648 | } | 1677 | } |
| 1649 | 1678 | ||
| 1679 | if (of_property_read_u32(np, "dma-channel", &dma_chan)) { | ||
| 1680 | dev_warn(&ofdev->dev, "no dma-channel property set." | ||
| 1681 | " Use channel 0\n"); | ||
| 1682 | dma_chan = 0; | ||
| 1683 | } | ||
| 1684 | host_pvt.dma_channel = dma_chan; | ||
| 1685 | |||
| 1650 | /* Ioremap SATA registers */ | 1686 | /* Ioremap SATA registers */ |
| 1651 | base = of_iomap(ofdev->dev.of_node, 0); | 1687 | base = of_iomap(ofdev->dev.of_node, 0); |
| 1652 | if (!base) { | 1688 | if (!base) { |
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 5c7d70c03bf0..dc35f4d42b8b 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c | |||
| @@ -894,21 +894,10 @@ static struct pci_driver inic_pci_driver = { | |||
| 894 | .remove = ata_pci_remove_one, | 894 | .remove = ata_pci_remove_one, |
| 895 | }; | 895 | }; |
| 896 | 896 | ||
| 897 | static int __init inic_init(void) | 897 | module_pci_driver(inic_pci_driver); |
| 898 | { | ||
| 899 | return pci_register_driver(&inic_pci_driver); | ||
| 900 | } | ||
| 901 | |||
| 902 | static void __exit inic_exit(void) | ||
| 903 | { | ||
| 904 | pci_unregister_driver(&inic_pci_driver); | ||
| 905 | } | ||
| 906 | 898 | ||
| 907 | MODULE_AUTHOR("Tejun Heo"); | 899 | MODULE_AUTHOR("Tejun Heo"); |
| 908 | MODULE_DESCRIPTION("low-level driver for Initio 162x SATA"); | 900 | MODULE_DESCRIPTION("low-level driver for Initio 162x SATA"); |
| 909 | MODULE_LICENSE("GPL v2"); | 901 | MODULE_LICENSE("GPL v2"); |
| 910 | MODULE_DEVICE_TABLE(pci, inic_pci_tbl); | 902 | MODULE_DEVICE_TABLE(pci, inic_pci_tbl); |
| 911 | MODULE_VERSION(DRV_VERSION); | 903 | MODULE_VERSION(DRV_VERSION); |
| 912 | |||
| 913 | module_init(inic_init); | ||
| 914 | module_exit(inic_exit); | ||
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 55d6179dde58..85ee4993ca74 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
| @@ -2510,22 +2510,11 @@ static void nv_adma_host_stop(struct ata_host *host) | |||
| 2510 | nv_ck804_host_stop(host); | 2510 | nv_ck804_host_stop(host); |
| 2511 | } | 2511 | } |
| 2512 | 2512 | ||
| 2513 | static int __init nv_init(void) | 2513 | module_pci_driver(nv_pci_driver); |
| 2514 | { | ||
| 2515 | return pci_register_driver(&nv_pci_driver); | ||
| 2516 | } | ||
| 2517 | |||
| 2518 | static void __exit nv_exit(void) | ||
| 2519 | { | ||
| 2520 | pci_unregister_driver(&nv_pci_driver); | ||
| 2521 | } | ||
| 2522 | 2514 | ||
| 2523 | module_init(nv_init); | ||
| 2524 | module_exit(nv_exit); | ||
| 2525 | module_param_named(adma, adma_enabled, bool, 0444); | 2515 | module_param_named(adma, adma_enabled, bool, 0444); |
| 2526 | MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)"); | 2516 | MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)"); |
| 2527 | module_param_named(swncq, swncq_enabled, bool, 0444); | 2517 | module_param_named(swncq, swncq_enabled, bool, 0444); |
| 2528 | MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)"); | 2518 | MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)"); |
| 2529 | module_param_named(msi, msi_enabled, bool, 0444); | 2519 | module_param_named(msi, msi_enabled, bool, 0444); |
| 2530 | MODULE_PARM_DESC(msi, "Enable use of MSI (Default: false)"); | 2520 | MODULE_PARM_DESC(msi, "Enable use of MSI (Default: false)"); |
| 2531 | |||
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 000fcc99e01d..489c81768321 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
| @@ -1249,21 +1249,10 @@ static int pdc_ata_init_one(struct pci_dev *pdev, | |||
| 1249 | &pdc_ata_sht); | 1249 | &pdc_ata_sht); |
| 1250 | } | 1250 | } |
| 1251 | 1251 | ||
| 1252 | static int __init pdc_ata_init(void) | 1252 | module_pci_driver(pdc_ata_pci_driver); |
| 1253 | { | ||
| 1254 | return pci_register_driver(&pdc_ata_pci_driver); | ||
| 1255 | } | ||
| 1256 | |||
| 1257 | static void __exit pdc_ata_exit(void) | ||
| 1258 | { | ||
| 1259 | pci_unregister_driver(&pdc_ata_pci_driver); | ||
| 1260 | } | ||
| 1261 | 1253 | ||
| 1262 | MODULE_AUTHOR("Jeff Garzik"); | 1254 | MODULE_AUTHOR("Jeff Garzik"); |
| 1263 | MODULE_DESCRIPTION("Promise ATA TX2/TX4/TX4000 low-level driver"); | 1255 | MODULE_DESCRIPTION("Promise ATA TX2/TX4/TX4000 low-level driver"); |
| 1264 | MODULE_LICENSE("GPL"); | 1256 | MODULE_LICENSE("GPL"); |
| 1265 | MODULE_DEVICE_TABLE(pci, pdc_ata_pci_tbl); | 1257 | MODULE_DEVICE_TABLE(pci, pdc_ata_pci_tbl); |
| 1266 | MODULE_VERSION(DRV_VERSION); | 1258 | MODULE_VERSION(DRV_VERSION); |
| 1267 | |||
| 1268 | module_init(pdc_ata_init); | ||
| 1269 | module_exit(pdc_ata_exit); | ||
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 9d1a47bb21b3..3b0dd57984e1 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
| @@ -635,21 +635,10 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
| 635 | &qs_ata_sht); | 635 | &qs_ata_sht); |
| 636 | } | 636 | } |
| 637 | 637 | ||
| 638 | static int __init qs_ata_init(void) | 638 | module_pci_driver(qs_ata_pci_driver); |
| 639 | { | ||
| 640 | return pci_register_driver(&qs_ata_pci_driver); | ||
| 641 | } | ||
| 642 | |||
| 643 | static void __exit qs_ata_exit(void) | ||
| 644 | { | ||
| 645 | pci_unregister_driver(&qs_ata_pci_driver); | ||
| 646 | } | ||
| 647 | 639 | ||
| 648 | MODULE_AUTHOR("Mark Lord"); | 640 | MODULE_AUTHOR("Mark Lord"); |
| 649 | MODULE_DESCRIPTION("Pacific Digital Corporation QStor SATA low-level driver"); | 641 | MODULE_DESCRIPTION("Pacific Digital Corporation QStor SATA low-level driver"); |
| 650 | MODULE_LICENSE("GPL"); | 642 | MODULE_LICENSE("GPL"); |
| 651 | MODULE_DEVICE_TABLE(pci, qs_ata_pci_tbl); | 643 | MODULE_DEVICE_TABLE(pci, qs_ata_pci_tbl); |
| 652 | MODULE_VERSION(DRV_VERSION); | 644 | MODULE_VERSION(DRV_VERSION); |
| 653 | |||
| 654 | module_init(qs_ata_init); | ||
| 655 | module_exit(qs_ata_exit); | ||
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 9dfb40b8c2c9..a7b31672c4b7 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
| @@ -819,16 +819,4 @@ static int sil_pci_device_resume(struct pci_dev *pdev) | |||
| 819 | } | 819 | } |
| 820 | #endif | 820 | #endif |
| 821 | 821 | ||
| 822 | static int __init sil_init(void) | 822 | module_pci_driver(sil_pci_driver); |
| 823 | { | ||
| 824 | return pci_register_driver(&sil_pci_driver); | ||
| 825 | } | ||
| 826 | |||
| 827 | static void __exit sil_exit(void) | ||
| 828 | { | ||
| 829 | pci_unregister_driver(&sil_pci_driver); | ||
| 830 | } | ||
| 831 | |||
| 832 | |||
| 833 | module_init(sil_init); | ||
| 834 | module_exit(sil_exit); | ||
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index e7e610aa9a7a..a5f2a563a26a 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
| @@ -1382,20 +1382,9 @@ static int sil24_port_resume(struct ata_port *ap) | |||
| 1382 | } | 1382 | } |
| 1383 | #endif | 1383 | #endif |
| 1384 | 1384 | ||
| 1385 | static int __init sil24_init(void) | 1385 | module_pci_driver(sil24_pci_driver); |
| 1386 | { | ||
| 1387 | return pci_register_driver(&sil24_pci_driver); | ||
| 1388 | } | ||
| 1389 | |||
| 1390 | static void __exit sil24_exit(void) | ||
| 1391 | { | ||
| 1392 | pci_unregister_driver(&sil24_pci_driver); | ||
| 1393 | } | ||
| 1394 | 1386 | ||
| 1395 | MODULE_AUTHOR("Tejun Heo"); | 1387 | MODULE_AUTHOR("Tejun Heo"); |
| 1396 | MODULE_DESCRIPTION("Silicon Image 3124/3132 SATA low-level driver"); | 1388 | MODULE_DESCRIPTION("Silicon Image 3124/3132 SATA low-level driver"); |
| 1397 | MODULE_LICENSE("GPL"); | 1389 | MODULE_LICENSE("GPL"); |
| 1398 | MODULE_DEVICE_TABLE(pci, sil24_pci_tbl); | 1390 | MODULE_DEVICE_TABLE(pci, sil24_pci_tbl); |
| 1399 | |||
| 1400 | module_init(sil24_init); | ||
| 1401 | module_exit(sil24_exit); | ||
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 95ec435f0eb4..fe3ca0989b14 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
| @@ -308,15 +308,4 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 308 | IRQF_SHARED, &sis_sht); | 308 | IRQF_SHARED, &sis_sht); |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | static int __init sis_init(void) | 311 | module_pci_driver(sis_pci_driver); |
| 312 | { | ||
| 313 | return pci_register_driver(&sis_pci_driver); | ||
| 314 | } | ||
| 315 | |||
| 316 | static void __exit sis_exit(void) | ||
| 317 | { | ||
| 318 | pci_unregister_driver(&sis_pci_driver); | ||
| 319 | } | ||
| 320 | |||
| 321 | module_init(sis_init); | ||
| 322 | module_exit(sis_exit); | ||
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index c646118943ff..44a4256533e1 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
| @@ -525,21 +525,10 @@ static struct pci_driver k2_sata_pci_driver = { | |||
| 525 | .remove = ata_pci_remove_one, | 525 | .remove = ata_pci_remove_one, |
| 526 | }; | 526 | }; |
| 527 | 527 | ||
| 528 | static int __init k2_sata_init(void) | 528 | module_pci_driver(k2_sata_pci_driver); |
| 529 | { | ||
| 530 | return pci_register_driver(&k2_sata_pci_driver); | ||
| 531 | } | ||
| 532 | |||
| 533 | static void __exit k2_sata_exit(void) | ||
| 534 | { | ||
| 535 | pci_unregister_driver(&k2_sata_pci_driver); | ||
| 536 | } | ||
| 537 | 529 | ||
| 538 | MODULE_AUTHOR("Benjamin Herrenschmidt"); | 530 | MODULE_AUTHOR("Benjamin Herrenschmidt"); |
| 539 | MODULE_DESCRIPTION("low-level driver for K2 SATA controller"); | 531 | MODULE_DESCRIPTION("low-level driver for K2 SATA controller"); |
| 540 | MODULE_LICENSE("GPL"); | 532 | MODULE_LICENSE("GPL"); |
| 541 | MODULE_DEVICE_TABLE(pci, k2_sata_pci_tbl); | 533 | MODULE_DEVICE_TABLE(pci, k2_sata_pci_tbl); |
| 542 | MODULE_VERSION(DRV_VERSION); | 534 | MODULE_VERSION(DRV_VERSION); |
| 543 | |||
| 544 | module_init(k2_sata_init); | ||
| 545 | module_exit(k2_sata_exit); | ||
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index cdaebbe3d184..122605593166 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
| @@ -1498,24 +1498,10 @@ static int pdc_sata_init_one(struct pci_dev *pdev, | |||
| 1498 | IRQF_SHARED, &pdc_sata_sht); | 1498 | IRQF_SHARED, &pdc_sata_sht); |
| 1499 | } | 1499 | } |
| 1500 | 1500 | ||
| 1501 | 1501 | module_pci_driver(pdc_sata_pci_driver); | |
| 1502 | static int __init pdc_sata_init(void) | ||
| 1503 | { | ||
| 1504 | return pci_register_driver(&pdc_sata_pci_driver); | ||
| 1505 | } | ||
| 1506 | |||
| 1507 | |||
| 1508 | static void __exit pdc_sata_exit(void) | ||
| 1509 | { | ||
| 1510 | pci_unregister_driver(&pdc_sata_pci_driver); | ||
| 1511 | } | ||
| 1512 | |||
| 1513 | 1502 | ||
| 1514 | MODULE_AUTHOR("Jeff Garzik"); | 1503 | MODULE_AUTHOR("Jeff Garzik"); |
| 1515 | MODULE_DESCRIPTION("Promise SATA low-level driver"); | 1504 | MODULE_DESCRIPTION("Promise SATA low-level driver"); |
| 1516 | MODULE_LICENSE("GPL"); | 1505 | MODULE_LICENSE("GPL"); |
| 1517 | MODULE_DEVICE_TABLE(pci, pdc_sata_pci_tbl); | 1506 | MODULE_DEVICE_TABLE(pci, pdc_sata_pci_tbl); |
| 1518 | MODULE_VERSION(DRV_VERSION); | 1507 | MODULE_VERSION(DRV_VERSION); |
| 1519 | |||
| 1520 | module_init(pdc_sata_init); | ||
| 1521 | module_exit(pdc_sata_exit); | ||
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index b54ebfcdda32..6d6489118873 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c | |||
| @@ -243,16 +243,4 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 243 | IRQF_SHARED, &uli_sht); | 243 | IRQF_SHARED, &uli_sht); |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | static int __init uli_init(void) | 246 | module_pci_driver(uli_pci_driver); |
| 247 | { | ||
| 248 | return pci_register_driver(&uli_pci_driver); | ||
| 249 | } | ||
| 250 | |||
| 251 | static void __exit uli_exit(void) | ||
| 252 | { | ||
| 253 | pci_unregister_driver(&uli_pci_driver); | ||
| 254 | } | ||
| 255 | |||
| 256 | |||
| 257 | module_init(uli_init); | ||
| 258 | module_exit(uli_exit); | ||
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index f93e43b0ccd8..5913ea9d57b2 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
| @@ -655,15 +655,4 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 655 | IRQF_SHARED, &svia_sht); | 655 | IRQF_SHARED, &svia_sht); |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | static int __init svia_init(void) | 658 | module_pci_driver(svia_pci_driver); |
| 659 | { | ||
| 660 | return pci_register_driver(&svia_pci_driver); | ||
| 661 | } | ||
| 662 | |||
| 663 | static void __exit svia_exit(void) | ||
| 664 | { | ||
| 665 | pci_unregister_driver(&svia_pci_driver); | ||
| 666 | } | ||
| 667 | |||
| 668 | module_init(svia_init); | ||
| 669 | module_exit(svia_exit); | ||
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index 6135a5288695..e8cf88ba145d 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c | |||
| @@ -436,21 +436,10 @@ static struct pci_driver vsc_sata_pci_driver = { | |||
| 436 | .remove = ata_pci_remove_one, | 436 | .remove = ata_pci_remove_one, |
| 437 | }; | 437 | }; |
| 438 | 438 | ||
| 439 | static int __init vsc_sata_init(void) | 439 | module_pci_driver(vsc_sata_pci_driver); |
| 440 | { | ||
| 441 | return pci_register_driver(&vsc_sata_pci_driver); | ||
| 442 | } | ||
| 443 | |||
| 444 | static void __exit vsc_sata_exit(void) | ||
| 445 | { | ||
| 446 | pci_unregister_driver(&vsc_sata_pci_driver); | ||
| 447 | } | ||
| 448 | 440 | ||
| 449 | MODULE_AUTHOR("Jeremy Higdon"); | 441 | MODULE_AUTHOR("Jeremy Higdon"); |
| 450 | MODULE_DESCRIPTION("low-level driver for Vitesse VSC7174 SATA controller"); | 442 | MODULE_DESCRIPTION("low-level driver for Vitesse VSC7174 SATA controller"); |
| 451 | MODULE_LICENSE("GPL"); | 443 | MODULE_LICENSE("GPL"); |
| 452 | MODULE_DEVICE_TABLE(pci, vsc_sata_pci_tbl); | 444 | MODULE_DEVICE_TABLE(pci, vsc_sata_pci_tbl); |
| 453 | MODULE_VERSION(DRV_VERSION); | 445 | MODULE_VERSION(DRV_VERSION); |
| 454 | |||
| 455 | module_init(vsc_sata_init); | ||
| 456 | module_exit(vsc_sata_exit); | ||
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index b58327758c58..ffd77739ae3e 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -68,6 +68,23 @@ static struct scsi_host_sg_pool scsi_sg_pools[] = { | |||
| 68 | 68 | ||
| 69 | struct kmem_cache *scsi_sdb_cache; | 69 | struct kmem_cache *scsi_sdb_cache; |
| 70 | 70 | ||
| 71 | #ifdef CONFIG_ACPI | ||
| 72 | #include <acpi/acpi_bus.h> | ||
| 73 | |||
| 74 | int scsi_register_acpi_bus_type(struct acpi_bus_type *bus) | ||
| 75 | { | ||
| 76 | bus->bus = &scsi_bus_type; | ||
| 77 | return register_acpi_bus_type(bus); | ||
| 78 | } | ||
| 79 | EXPORT_SYMBOL_GPL(scsi_register_acpi_bus_type); | ||
| 80 | |||
| 81 | void scsi_unregister_acpi_bus_type(struct acpi_bus_type *bus) | ||
| 82 | { | ||
| 83 | unregister_acpi_bus_type(bus); | ||
| 84 | } | ||
| 85 | EXPORT_SYMBOL_GPL(scsi_unregister_acpi_bus_type); | ||
| 86 | #endif | ||
| 87 | |||
| 71 | /* | 88 | /* |
| 72 | * When to reinvoke queueing after a resource shortage. It's 3 msecs to | 89 | * When to reinvoke queueing after a resource shortage. It's 3 msecs to |
| 73 | * not change behaviour from the previous unplug mechanism, experimentation | 90 | * not change behaviour from the previous unplug mechanism, experimentation |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 32df2b6ef0e0..5713d3ac381a 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -578,6 +578,7 @@ static inline int ata_is_data(u8 prot) | |||
| 578 | ((u64) (id)[(n) + 0]) ) | 578 | ((u64) (id)[(n) + 0]) ) |
| 579 | 579 | ||
| 580 | #define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20) | 580 | #define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20) |
| 581 | #define ata_id_has_da(id) ((id)[77] & (1 << 4)) | ||
| 581 | 582 | ||
| 582 | static inline bool ata_id_has_hipm(const u16 *id) | 583 | static inline bool ata_id_has_hipm(const u16 *id) |
| 583 | { | 584 | { |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 53da442f892d..64f90e17e51d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -161,6 +161,8 @@ enum { | |||
| 161 | ATA_DFLAG_DETACH = (1 << 24), | 161 | ATA_DFLAG_DETACH = (1 << 24), |
| 162 | ATA_DFLAG_DETACHED = (1 << 25), | 162 | ATA_DFLAG_DETACHED = (1 << 25), |
| 163 | 163 | ||
| 164 | ATA_DFLAG_DA = (1 << 26), /* device supports Device Attention */ | ||
| 165 | |||
| 164 | ATA_DEV_UNKNOWN = 0, /* unknown device */ | 166 | ATA_DEV_UNKNOWN = 0, /* unknown device */ |
| 165 | ATA_DEV_ATA = 1, /* ATA device */ | 167 | ATA_DEV_ATA = 1, /* ATA device */ |
| 166 | ATA_DEV_ATA_UNSUP = 2, /* ATA device (unsupported) */ | 168 | ATA_DEV_ATA_UNSUP = 2, /* ATA device (unsupported) */ |
| @@ -545,9 +547,6 @@ struct ata_host { | |||
| 545 | struct mutex eh_mutex; | 547 | struct mutex eh_mutex; |
| 546 | struct task_struct *eh_owner; | 548 | struct task_struct *eh_owner; |
| 547 | 549 | ||
| 548 | #ifdef CONFIG_ATA_ACPI | ||
| 549 | acpi_handle acpi_handle; | ||
| 550 | #endif | ||
| 551 | struct ata_port *simplex_claimed; /* channel owning the DMA */ | 550 | struct ata_port *simplex_claimed; /* channel owning the DMA */ |
| 552 | struct ata_port *ports[0]; | 551 | struct ata_port *ports[0]; |
| 553 | }; | 552 | }; |
| @@ -615,7 +614,6 @@ struct ata_device { | |||
| 615 | struct scsi_device *sdev; /* attached SCSI device */ | 614 | struct scsi_device *sdev; /* attached SCSI device */ |
| 616 | void *private_data; | 615 | void *private_data; |
| 617 | #ifdef CONFIG_ATA_ACPI | 616 | #ifdef CONFIG_ATA_ACPI |
| 618 | acpi_handle acpi_handle; | ||
| 619 | union acpi_object *gtf_cache; | 617 | union acpi_object *gtf_cache; |
| 620 | unsigned int gtf_filter; | 618 | unsigned int gtf_filter; |
| 621 | #endif | 619 | #endif |
| @@ -797,7 +795,6 @@ struct ata_port { | |||
| 797 | void *private_data; | 795 | void *private_data; |
| 798 | 796 | ||
| 799 | #ifdef CONFIG_ATA_ACPI | 797 | #ifdef CONFIG_ATA_ACPI |
| 800 | acpi_handle acpi_handle; | ||
| 801 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ | 798 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ |
| 802 | #endif | 799 | #endif |
| 803 | /* owned by EH */ | 800 | /* owned by EH */ |
| @@ -1116,6 +1113,8 @@ int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); | |||
| 1116 | int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); | 1113 | int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); |
| 1117 | unsigned long ata_acpi_gtm_xfermask(struct ata_device *dev, | 1114 | unsigned long ata_acpi_gtm_xfermask(struct ata_device *dev, |
| 1118 | const struct ata_acpi_gtm *gtm); | 1115 | const struct ata_acpi_gtm *gtm); |
| 1116 | acpi_handle ata_ap_acpi_handle(struct ata_port *ap); | ||
| 1117 | acpi_handle ata_dev_acpi_handle(struct ata_device *dev); | ||
| 1119 | int ata_acpi_cbl_80wire(struct ata_port *ap, const struct ata_acpi_gtm *gtm); | 1118 | int ata_acpi_cbl_80wire(struct ata_port *ap, const struct ata_acpi_gtm *gtm); |
| 1120 | #else | 1119 | #else |
| 1121 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | 1120 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index c6f0974b8916..66216c1acb48 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
| @@ -216,6 +216,16 @@ scsi_command_size(const unsigned char *cmnd) | |||
| 216 | scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); | 216 | scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | #ifdef CONFIG_ACPI | ||
| 220 | struct acpi_bus_type; | ||
| 221 | |||
| 222 | extern int | ||
| 223 | scsi_register_acpi_bus_type(struct acpi_bus_type *bus); | ||
| 224 | |||
| 225 | extern void | ||
| 226 | scsi_unregister_acpi_bus_type(struct acpi_bus_type *bus); | ||
| 227 | #endif | ||
| 228 | |||
| 219 | /* | 229 | /* |
| 220 | * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft | 230 | * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft |
| 221 | * T10/1561-D Revision 4 Draft dated 7th November 2002. | 231 | * T10/1561-D Revision 4 Draft dated 7th November 2002. |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7539f52a33c9..9895f69294fc 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -154,6 +154,7 @@ struct scsi_device { | |||
| 154 | unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */ | 154 | unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */ |
| 155 | unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */ | 155 | unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */ |
| 156 | unsigned is_visible:1; /* is the device visible in sysfs */ | 156 | unsigned is_visible:1; /* is the device visible in sysfs */ |
| 157 | unsigned can_power_off:1; /* Device supports runtime power off */ | ||
| 157 | unsigned wce_default_on:1; /* Cache is ON by default */ | 158 | unsigned wce_default_on:1; /* Cache is ON by default */ |
| 158 | 159 | ||
| 159 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 160 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
