]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ata: ahci_platform: fix owner module reference mismatch for scsi host
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 28 Jan 2015 23:30:29 +0000 (08:30 +0900)
committerTejun Heo <tj@kernel.org>
Wed, 28 Jan 2015 23:45:23 +0000 (18:45 -0500)
commit018d5ef2048fcab339467bcbebccf588c9bd2531
tree3f6acefe4dc0799f07a100a66b4b3eceb1087fab
parentcedda4c3b1ded2cc4951aeca38fdf862b9b79fb6
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
12 files changed:
drivers/ata/ahci.h
drivers/ata/ahci_da850.c
drivers/ata/ahci_imx.c
drivers/ata/ahci_mvebu.c
drivers/ata/ahci_platform.c
drivers/ata/ahci_st.c
drivers/ata/ahci_sunxi.c
drivers/ata/ahci_tegra.c
drivers/ata/ahci_xgene.c
drivers/ata/libahci_platform.c
include/linux/ahci_platform.h
include/linux/libata.h