linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: ahci_sunxi: disable resources on driver removal
@ 2014-03-17 13:05 Bartlomiej Zolnierkiewicz
  2014-03-17 13:16 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-17 13:05 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Hans de Goede, Maxime Ripard, Oliver Schinagl, linux-ide,
	linux-arm-kernel, linux-kernel

Add custom ->host_stop method to disable resources on driver removal.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
Compile tested only.

 drivers/ata/ahci_sunxi.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Index: b/drivers/ata/ahci_sunxi.c
===================================================================
--- a/drivers/ata/ahci_sunxi.c	2014-03-17 13:48:26.292485389 +0100
+++ b/drivers/ata/ahci_sunxi.c	2014-03-17 13:55:48.912477842 +0100
@@ -156,13 +156,25 @@ static void ahci_sunxi_start_engine(stru
 	sunxi_setbits(port_mmio + PORT_CMD, PORT_CMD_START);
 }
 
+static void ahci_sunxi_host_stop(struct ata_host *host)
+{
+	struct ahci_host_priv *hpriv = host->private_data;
+
+	ahci_platform_disable_resources(hpriv);
+}
+
+static struct ata_port_operations ahci_sunxi_port_ops = {
+	.inherits	= &ahci_platform_ops,
+	.host_stop	= ahci_sunxi_host_stop,
+};
+
 static const struct ata_port_info ahci_sunxi_port_info = {
 	AHCI_HFLAGS(AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
 			  AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ),
 	.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
 	.pio_mask	= ATA_PIO4,
 	.udma_mask	= ATA_UDMA6,
-	.port_ops	= &ahci_platform_ops,
+	.port_ops	= &ahci_sunxi_port_ops,
 };
 
 static int ahci_sunxi_probe(struct platform_device *pdev)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: ahci_sunxi: disable resources on driver removal
  2014-03-17 13:05 [PATCH] ata: ahci_sunxi: disable resources on driver removal Bartlomiej Zolnierkiewicz
@ 2014-03-17 13:16 ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-17 13:16 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Hans de Goede, Maxime Ripard, Oliver Schinagl, linux-ide,
	linux-arm-kernel, linux-kernel

On Monday, March 17, 2014 02:05:15 PM Bartlomiej Zolnierkiewicz wrote:
> Add custom ->host_stop method to disable resources on driver removal.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

After looking some more into ahci_platform.c it seems that this patch
is not needed, sorry for the noise.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-17 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 13:05 [PATCH] ata: ahci_sunxi: disable resources on driver removal Bartlomiej Zolnierkiewicz
2014-03-17 13:16 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).