aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ahci_platform.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2015-01-28 18:30:29 -0500
committerTejun Heo <tj@kernel.org>2015-01-28 18:45:23 -0500
commit018d5ef2048fcab339467bcbebccf588c9bd2531 (patch)
tree3f6acefe4dc0799f07a100a66b4b3eceb1087fab /include/linux/ahci_platform.h
parentcedda4c3b1ded2cc4951aeca38fdf862b9b79fb6 (diff)
ata: ahci_platform: fix owner module reference mismatch for scsi host
The owner module reference of the ahci platform's scsi_host is initialized to libahci_platform's one, because these drivers use a scsi_host_template defined in libahci_platform. So these drivers can be unloaded even if the scsi device is being accessed. This fixes it by pushing the scsi_host_template from libahci_platform to all leaf drivers. The scsi_host_template is passed through a new argument of ahci_platform_init_host(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org
Diffstat (limited to 'include/linux/ahci_platform.h')
-rw-r--r--include/linux/ahci_platform.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h
index f65b33809170..a270f25ee7c7 100644
--- a/include/linux/ahci_platform.h
+++ b/include/linux/ahci_platform.h
@@ -21,6 +21,7 @@ struct device;
21struct ata_port_info; 21struct ata_port_info;
22struct ahci_host_priv; 22struct ahci_host_priv;
23struct platform_device; 23struct platform_device;
24struct scsi_host_template;
24 25
25int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); 26int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
26void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); 27void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
@@ -32,7 +33,8 @@ struct ahci_host_priv *ahci_platform_get_resources(
32 struct platform_device *pdev); 33 struct platform_device *pdev);
33int ahci_platform_init_host(struct platform_device *pdev, 34int ahci_platform_init_host(struct platform_device *pdev,
34 struct ahci_host_priv *hpriv, 35 struct ahci_host_priv *hpriv,
35 const struct ata_port_info *pi_template); 36 const struct ata_port_info *pi_template,
37 struct scsi_host_template *sht);
36 38
37int ahci_platform_suspend_host(struct device *dev); 39int ahci_platform_suspend_host(struct device *dev);
38int ahci_platform_resume_host(struct device *dev); 40int ahci_platform_resume_host(struct device *dev);