Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
ahci: fix module refcount breakage introduced by libahci split

+24 -14
+4
drivers/ata/ahci.c
··· 90 90 static int ahci_pci_device_resume(struct pci_dev *pdev); 91 91 #endif 92 92 93 + static struct scsi_host_template ahci_sht = { 94 + AHCI_SHT("ahci"), 95 + }; 96 + 93 97 static struct ata_port_operations ahci_vt8251_ops = { 94 98 .inherits = &ahci_ops, 95 99 .hardreset = ahci_vt8251_hardreset,
+11 -1
drivers/ata/ahci.h
··· 298 298 299 299 extern int ahci_ignore_sss; 300 300 301 - extern struct scsi_host_template ahci_sht; 301 + extern struct device_attribute *ahci_shost_attrs[]; 302 + extern struct device_attribute *ahci_sdev_attrs[]; 303 + 304 + #define AHCI_SHT(drv_name) \ 305 + ATA_NCQ_SHT(drv_name), \ 306 + .can_queue = AHCI_MAX_CMDS - 1, \ 307 + .sg_tablesize = AHCI_MAX_SG, \ 308 + .dma_boundary = AHCI_DMA_BOUNDARY, \ 309 + .shost_attrs = ahci_shost_attrs, \ 310 + .sdev_attrs = ahci_sdev_attrs 311 + 302 312 extern struct ata_port_operations ahci_ops; 303 313 304 314 void ahci_save_initial_config(struct device *dev,
+5 -1
drivers/ata/ahci_platform.c
··· 23 23 #include <linux/ahci_platform.h> 24 24 #include "ahci.h" 25 25 26 + static struct scsi_host_template ahci_platform_sht = { 27 + AHCI_SHT("ahci_platform"), 28 + }; 29 + 26 30 static int __init ahci_probe(struct platform_device *pdev) 27 31 { 28 32 struct device *dev = &pdev->dev; ··· 149 145 ahci_print_info(host, "platform"); 150 146 151 147 rc = ata_host_activate(host, irq, ahci_interrupt, IRQF_SHARED, 152 - &ahci_sht); 148 + &ahci_platform_sht); 153 149 if (rc) 154 150 goto err0; 155 151
+4 -12
drivers/ata/libahci.c
··· 121 121 static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO, 122 122 ahci_read_em_buffer, ahci_store_em_buffer); 123 123 124 - static struct device_attribute *ahci_shost_attrs[] = { 124 + struct device_attribute *ahci_shost_attrs[] = { 125 125 &dev_attr_link_power_management_policy, 126 126 &dev_attr_em_message_type, 127 127 &dev_attr_em_message, ··· 132 132 &dev_attr_em_buffer, 133 133 NULL 134 134 }; 135 + EXPORT_SYMBOL_GPL(ahci_shost_attrs); 135 136 136 - static struct device_attribute *ahci_sdev_attrs[] = { 137 + struct device_attribute *ahci_sdev_attrs[] = { 137 138 &dev_attr_sw_activity, 138 139 &dev_attr_unload_heads, 139 140 NULL 140 141 }; 141 - 142 - struct scsi_host_template ahci_sht = { 143 - ATA_NCQ_SHT("ahci"), 144 - .can_queue = AHCI_MAX_CMDS - 1, 145 - .sg_tablesize = AHCI_MAX_SG, 146 - .dma_boundary = AHCI_DMA_BOUNDARY, 147 - .shost_attrs = ahci_shost_attrs, 148 - .sdev_attrs = ahci_sdev_attrs, 149 - }; 150 - EXPORT_SYMBOL_GPL(ahci_sht); 142 + EXPORT_SYMBOL_GPL(ahci_sdev_attrs); 151 143 152 144 struct ata_port_operations ahci_ops = { 153 145 .inherits = &sata_pmp_port_ops,