Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3286773yba; Tue, 23 Apr 2019 00:44:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE6VFW0mGNSics69TOL/DqtQU21/pvlTOCs12xWXSwtjSw+oI2Aqaqn3a2f6lM3diEx9sV X-Received: by 2002:a62:5fc7:: with SMTP id t190mr24983878pfb.191.1556005446775; Tue, 23 Apr 2019 00:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005446; cv=none; d=google.com; s=arc-20160816; b=b3pUKnRSbR/3o2Lh0KCF1BH+PMuTiNv6YIxRR7zSWU4VpnKdf6dyTl2irMRP4L2s1I F6yT00KTAaDb5d9mg+fug+MSjY9TlRBqDNJg0J6uf7khnR3yV5E/WEYtTSIDhWOgVmMG PWty7YnudTEyDfcFpHS6/YdQNRRDggoPeRGgM8/k1C6C+BFyH+Grcmw+9miRe4CPfC8q zcqGsbO/5Q/SdK/LpEOsc8wMi63lj32CSKX8ZltMhUzmrxvHSK/u9syxXrEJmJMnC9D/ xkJBrxQJXm+KVD1voEUlDemZk56VZbE7qkggnNSO7QNblGpUMreVMG6bhUoNga0BUOSh 9xvg== 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=FVIX0yvn8nxPycGAFodoj40ENuxZahlJ3DX/iOOwIFw=; b=qkbKPeFDVHpaCepDamc/7rX5zofExxULJQHod5OJmDPl1CMyt3R6VuwIaAR+KU/Ciy lrRbnv7tPRwSGpasSlGlaP80czYkWYkQ3RufI+bFMElpjfCxflNf09lYlW6tkjdG3xey qb5b5K4/AUo2SSNv75LR237pfp6OjH6HKeGTERrUR8t6WcoEBChmWhwJc5JqzFEl85sq byYXZZs6EYFaPiEWh/tx9qptWXuOKte27Vh1/CAbG7tjw77nvD8hXgmY3SgVy+FBkyUr Z5pdwJmHag/92nd1GfvWTyS2f81Nch/H7WiOFD731CmrVzRkZzz1OOMLmsHM3XxW9Zxz yJ6Q== 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 s83si14033645pgs.420.2019.04.23.00.43.51; Tue, 23 Apr 2019 00:44:06 -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 S1726830AbfDWHmM (ORCPT + 99 others); Tue, 23 Apr 2019 03:42:12 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7216 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726378AbfDWHkV (ORCPT ); Tue, 23 Apr 2019 03:40:21 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 39F63720BF1FCC7CC467; Tue, 23 Apr 2019 15:40:17 +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:08 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Dmitry Torokhov , Subject: [PATCH next 11/25] input: mouse: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:06 +0800 Message-ID: <20190423075020.173734-12-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: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/input/mouse/navpoint.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c index d6e8f58a1de3..3d83a79e14d9 100644 --- a/drivers/input/mouse/navpoint.c +++ b/drivers/input/mouse/navpoint.c @@ -320,8 +320,7 @@ static int navpoint_remove(struct platform_device *pdev) static int __maybe_unused navpoint_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct navpoint *navpoint = platform_get_drvdata(pdev); + struct navpoint *navpoint = dev_get_drvdata(dev); struct input_dev *input = navpoint->input; mutex_lock(&input->mutex); @@ -334,8 +333,7 @@ static int __maybe_unused navpoint_suspend(struct device *dev) static int __maybe_unused navpoint_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct navpoint *navpoint = platform_get_drvdata(pdev); + struct navpoint *navpoint = dev_get_drvdata(dev); struct input_dev *input = navpoint->input; mutex_lock(&input->mutex); -- 2.20.1