From patchwork Thu Sep 17 09:45:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 7205061 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CC78BEEC1 for ; Thu, 17 Sep 2015 09:56:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BFB920729 for ; Thu, 17 Sep 2015 09:56:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57E08206F4 for ; Thu, 17 Sep 2015 09:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753881AbbIQJ4P (ORCPT ); Thu, 17 Sep 2015 05:56:15 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:40010 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753520AbbIQJy5 (ORCPT ); Thu, 17 Sep 2015 05:54:57 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NUT031WDFJF7V60@mailout4.samsung.com>; Thu, 17 Sep 2015 18:54:51 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.125]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id BF.3C.29324.BED8AF55; Thu, 17 Sep 2015 18:54:51 +0900 (KST) X-AuditID: cbfee68d-f79106d00000728c-f4-55fa8debb5ae Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id A6.3C.23663.BED8AF55; Thu, 17 Sep 2015 18:54:51 +0900 (KST) Received: from exypnos.sisodomain.com ([107.108.73.28]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NUT000DPFIZ1D40@mmp1.samsung.com>; Thu, 17 Sep 2015 18:54:51 +0900 (KST) From: Alim Akhtar To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: JBottomley@odin.com, vinholikatti@gmail.com, amit.daniel@samsung.com, essuuj@gmail.com, devicetree@vger.kernel.org Subject: [PATCH v2 08/11] scsi: ufs: make ufshcd_config_pwr_mode of non-static func Date: Thu, 17 Sep 2015 15:15:34 +0530 Message-id: <1442483137-32376-9-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1442483137-32376-1-git-send-email-alim.akhtar@samsung.com> References: <1442483137-32376-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsWyRsSkVvd1769Qg3XvdC0aroZYzD9yjtVi +YUlTBb/199msbi8aw6bRff1HWwWOxZWObB77Jx1l93j8I8fzB59W1YxenzeJBfAEsVlk5Ka k1mWWqRvl8CVsa7nF3PBAcGKl/39LA2Mt/m6GDk5JARMJM51/WeBsMUkLtxbz9bFyMUhJLCC UeLv3gdACQ6wopWbpSHiSxklut/dYYdwfjJK7P7zjRmkm01AW+Lu9C1MILaIgI3E+ZsPwGxm gQqJW2cmgG0QFgiV6G1dyQ5iswioShzcuoMZZAGvgLvE47+6EEcoSnQ/m8AGYnMKeEi8+r+I FaRECKjk/IZakLUSApPZJebdP8ICMUZA4tvkQ1B3ykpsOsAMMUZS4uCKGywTGIUXMDKsYhRN LUguKE5KLzLUK07MLS7NS9dLzs/dxAgM6tP/nvXuYLx9wPoQowAHoxIPr4LLr1Ah1sSy4src Q4ymQBsmMkuJJucDYyevJN7Q2MzIwtTE1NjI3NJMSZxXUepnsJBAemJJanZq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Whz64kKrEUZyQaajEXFScCAL8ANNSyAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Seungwon Jeon This makes ufshcd_config_pwr_mode non-static so that other vendors like exynos can use the same. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c | 5 ++--- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ccf7c83..da52c45 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -185,8 +185,6 @@ static int ufshcd_uic_hibern8_ctrl(struct ufs_hba *hba, bool en); static inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba); static int ufshcd_host_reset_and_restore(struct ufs_hba *hba); static irqreturn_t ufshcd_intr(int irq, void *__hba); -static int ufshcd_config_pwr_mode(struct ufs_hba *hba, - struct ufs_pa_layer_attr *desired_pwr_mode); static int ufshcd_change_power_mode(struct ufs_hba *hba, struct ufs_pa_layer_attr *pwr_mode); @@ -2597,7 +2595,7 @@ static int ufshcd_change_power_mode(struct ufs_hba *hba, * @hba: per-adapter instance * @desired_pwr_mode: desired power configuration */ -static int ufshcd_config_pwr_mode(struct ufs_hba *hba, +int ufshcd_config_pwr_mode(struct ufs_hba *hba, struct ufs_pa_layer_attr *desired_pwr_mode) { struct ufs_pa_layer_attr final_params = { 0 }; @@ -2613,6 +2611,7 @@ static int ufshcd_config_pwr_mode(struct ufs_hba *hba, return ret; } +EXPORT_SYMBOL_GPL(ufshcd_config_pwr_mode); /** * ufshcd_complete_dev_init() - checks device readiness diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 2fd0c3c..83fe605 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -636,6 +636,8 @@ extern int ufshcd_dme_set_attr(struct ufs_hba *hba, u32 attr_sel, u8 attr_set, u32 mib_val, u8 peer); extern int ufshcd_dme_get_attr(struct ufs_hba *hba, u32 attr_sel, u32 *mib_val, u8 peer); +extern int ufshcd_config_pwr_mode(struct ufs_hba *hba, + struct ufs_pa_layer_attr *desired_pwr_mode); /* UIC command interfaces for DME primitives */ #define DME_LOCAL 0