• Akinobu Mita's avatar
    ata: pata_platform: fix owner module reference mismatch for scsi host · 17263905
    Akinobu Mita authored
    The owner module reference of the pata_of_platform's scsi_host is
    initialized to pata_platform's one, because pata_of_platform driver
    use a scsi_host_template defined in pata_platform.  So this drivers
    can be unloaded even if the scsi device is being accessed.
    
    This fixes it by propagating the scsi_host_template to pata_of_platform
    driver.  The scsi_host_template is passed through a new
    argument of __pata_platform_probe().
    Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
    Signed-off-by: default avatarTejun 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
    17263905
pata_platform.c 6.48 KB