Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845AbdCPVah (ORCPT ); Thu, 16 Mar 2017 17:30:37 -0400 Received: from mail-yw0-f172.google.com ([209.85.161.172]:32902 "EHLO mail-yw0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbdCPVaf (ORCPT ); Thu, 16 Mar 2017 17:30:35 -0400 Date: Thu, 16 Mar 2017 17:30:32 -0400 From: Tejun Heo To: Anurag Kumar Vulisha Cc: Hans de Goede , anirudh@xilinx.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Anurag Kumar Vulisha Subject: Re: [RFC PATCH] drivers: ata: Add [save|restore]_initial_config override functions Message-ID: <20170316213032.GE1480@htj.duckdns.org> References: <1489492761-815-1-git-send-email-anuragku@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489492761-815-1-git-send-email-anuragku@xilinx.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 607 Lines: 19 On Tue, Mar 14, 2017 at 05:29:21PM +0530, Anurag Kumar Vulisha wrote: > @@ -613,7 +613,10 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev, > "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); > } > > - ahci_save_initial_config(&pdev->dev, hpriv); > + if (hpriv->save_initial_config == NULL) > + ahci_save_initial_config(dev, hpriv); > + else > + hpriv->save_initial_config(dev, hpriv); Can you just initialize hpriv->save_initial_config to ahci_save_initial_config and let the init function override it as necessary? Thanks. -- tejun