From 018d5ef2048fcab339467bcbebccf588c9bd2531 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 29 Jan 2015 08:30:29 +0900 Subject: 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 Signed-off-by: Tejun Heo Cc: Hans de Goede Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org --- drivers/ata/ahci.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/ata/ahci.h') diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 275358ae0b3f..71262e08648e 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -354,6 +354,10 @@ extern int ahci_ignore_sss; extern struct device_attribute *ahci_shost_attrs[]; extern struct device_attribute *ahci_sdev_attrs[]; +/* + * This must be instantiated by the edge drivers. Read the comments + * for ATA_BASE_SHT + */ #define AHCI_SHT(drv_name) \ ATA_NCQ_SHT(drv_name), \ .can_queue = AHCI_MAX_CMDS - 1, \ -- cgit