Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3285497yba; Tue, 23 Apr 2019 00:42:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfnQedntKBcT2JJw9ZJi5PJCGkzAFQFbbHqxW2+BK6t3Khpd8UZk34D3EF4/Y7x2jweg89 X-Received: by 2002:a63:494f:: with SMTP id y15mr23173539pgk.56.1556005325574; Tue, 23 Apr 2019 00:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005325; cv=none; d=google.com; s=arc-20160816; b=ANKU0y49OANFs8Y4P6NoO73bZPRffucV+arquSw+GluBCKgXTlaT70B+KvkOH9YOwi aFfnY0NwYbAqf5cHBZk5SNEkU+Rv0fLTp5R/v0fH1f1k9mz0bo+r6Fs/5GWA97p5uNzb UuwWmQxmVru1VX5S5jhQ5kO49TIihTFPjeE6ngE+Yh0S14LlvuIzYtNX1FFpgYfm1kNA WhjaFsEwwCweQat6nI4ZeQvNPJX/zPnmBVwigwu5oIgn8TN/JNc06jpf9GxRaQNLqDvt IFaebxKGzqNJzz9gHgo9j9yTFrcD2hl0Bl4mK9anZSvAG9CoAx9KA6o8Vdi0Lz2HTp7m KbMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8oXX2zXSQYAmhzu/Z8yae8lFauxrKIBgTRUO6W++dOs=; b=vit3ipTxyeX41xzQnOsConVlu+BXjoIgiK5vgCyfURVw84e1lyeHS4dE3eTfQHKkFC OTRaskw8zO+8rCwFHVupWKEBOeBSTf+wX87k+iJHg3Hsksqfz3PS6jJA2Us9lAZimfav MLaIwKnrmohcCJsCHTC4sNBRvNjbOloonOlZHLNVP72j+w2nHb+HoZWnDDsr42pd2vk+ 3p0XcU9O0hdv369nnO2rzPhMRE+pXxfzDO4Rf34AG+znnSfmVn4SMjgeDMjBHYuNBG7x mGwhn3ZdYMZIO0OahOxx+Cjw/dKgTs9uKHNCGk2wgHeAMSn5QK2d4OGutYth6Q13t+VE uFjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si13840191pgq.116.2019.04.23.00.41.50; Tue, 23 Apr 2019 00:42:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfDWHkn (ORCPT + 99 others); Tue, 23 Apr 2019 03:40:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7230 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726491AbfDWHk1 (ORCPT ); Tue, 23 Apr 2019 03:40:27 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5C8582AB8605C2C66D24; Tue, 23 Apr 2019 15:40:22 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:16 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Bin Liu , Greg Kroah-Hartman , Subject: [PATCH next 24/25] usb: musb: dsps: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:19 +0800 Message-ID: <20190423075020.173734-25-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: Bin Liu Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/usb/musb/musb_dsps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 403eb97915f8..327d4f7baaf7 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -168,8 +168,7 @@ static void dsps_mod_timer_optional(struct dsps_glue *glue) static void dsps_musb_enable(struct musb *musb) { struct device *dev = musb->controller; - struct platform_device *pdev = to_platform_device(dev->parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); + struct dsps_glue *glue = dev_get_drvdata(dev->parent); const struct dsps_musb_wrapper *wrp = glue->wrp; void __iomem *reg_base = musb->ctrl_base; u32 epmask, coremask; @@ -195,8 +194,7 @@ static void dsps_musb_enable(struct musb *musb) static void dsps_musb_disable(struct musb *musb) { struct device *dev = musb->controller; - struct platform_device *pdev = to_platform_device(dev->parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); + struct dsps_glue *glue = dev_get_drvdata(dev->parent); const struct dsps_musb_wrapper *wrp = glue->wrp; void __iomem *reg_base = musb->ctrl_base; -- 2.20.1