From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFC v3 01/13] libahci: Allow drivers to override start_engine Date: Sat, 18 Jan 2014 23:46:43 -0500 Message-ID: <20140119044643.GH3640@htj.dyndns.org> References: <1390088935-7193-1-git-send-email-hdegoede@redhat.com> <1390088935-7193-2-git-send-email-hdegoede@redhat.com> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <1390088935-7193-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Post: , List-Help: , List-Archive: List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline To: Hans de Goede Cc: Oliver Schinagl , Maxime Ripard , Richard Zhu , linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: linux-ide@vger.kernel.org Hello, Hans. On Sun, Jan 19, 2014 at 12:48:43AM +0100, Hans de Goede wrote: > void ahci_start_engine(struct ata_port *ap) > { > void __iomem *port_mmio = ahci_port_base(ap); > + struct ahci_host_priv *hpriv = ap->host->private_data; > u32 tmp; > > + if (hpriv->start_engine) { > + hpriv->start_engine(ap); > + return; > + } > + I'd much prefer if the driver always calls hpriv->start_engine() which is initialized to the default callback during common init and then overridden if necessary. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 From: tj@kernel.org (Tejun Heo) Date: Sat, 18 Jan 2014 23:46:43 -0500 Subject: [RFC v3 01/13] libahci: Allow drivers to override start_engine In-Reply-To: <1390088935-7193-2-git-send-email-hdegoede@redhat.com> References: <1390088935-7193-1-git-send-email-hdegoede@redhat.com> <1390088935-7193-2-git-send-email-hdegoede@redhat.com> Message-ID: <20140119044643.GH3640@htj.dyndns.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, Hans. On Sun, Jan 19, 2014 at 12:48:43AM +0100, Hans de Goede wrote: > void ahci_start_engine(struct ata_port *ap) > { > void __iomem *port_mmio = ahci_port_base(ap); > + struct ahci_host_priv *hpriv = ap->host->private_data; > u32 tmp; > > + if (hpriv->start_engine) { > + hpriv->start_engine(ap); > + return; > + } > + I'd much prefer if the driver always calls hpriv->start_engine() which is initialized to the default callback during common init and then overridden if necessary. Thanks. -- tejun