Received: by 10.192.165.156 with SMTP id m28csp769422imm; Thu, 19 Apr 2018 07:17:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Du1XtG6nbTiWaeFq0Xp8qsuZDfz22G0V+BFaNQY3WSfvuPCShRIx4bvdRnygwsl3F2dSf X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr6405576pla.328.1524147455691; Thu, 19 Apr 2018 07:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147455; cv=none; d=google.com; s=arc-20160816; b=ExA+3LLpROavCAbERVkBRs1vUrMJuVey3eSsTTUFZ+viAJ+2HMwK9H6Xea28EkjDXt EQLCGdCZkXrhLjpr7wPI8gjz6PhH4op/REG0b3/ts8GeQSWdsHi+orBJT+rwiWitL7zc Ap1EueTziBCsYOg9R9oBgDk780sa/n+aZ7OehhcI0KwNHhlD6db+uAp+PcXBfcdQDneL jnELJTF8lBVdBYS3LNbu95JvJ36LvPUpd87Huo1uVXY3KU3XM+zq9/zeYT5EX+nB7Sz/ dXVZuDa9ZW2hdh+g8v78xGaf1LDtgdNADrkLNGzkH6q8FPMaq1cIuSwqghDUvlcFno/R 5oQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=tCngn8+hURuMPI7kabZygthxvVpTIJ01qeXaqJMcYjM=; b=T6bdTfkafUYAp7mdG/myuD/Oq/GBEohHCAE9Cc4n7nUF3ehcWfJ7EO7DA9SAt9uBgE YfSbzWXdQk65zWGdDfA1TO/DA0QyJKgwHKZThWA7LrCmAJbK2xJkO7xDC2bAbspsjnfg LQhYNIYoZbRrnR27drAi7dUWAQJJA9rqm9xzJzz4d8PuLAag2t0/KrkXviTt6HO+zyWu 0vfIR6jP+5euYxYD1Et4qnVPBn4+Qt5BPmADNK/WqxaqCLIont1jkeog9l0gDffxRwqN X54xuOgaTh4LqXlK7lqlVD1yD7lYqDGE/+v/S+cnArBiSKnZodF6LtBvhXiMw9HvoTJC dXnQ== 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 r14si2963669pgt.292.2018.04.19.07.17.21; Thu, 19 Apr 2018 07:17:35 -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 S1753527AbeDSOHH (ORCPT + 99 others); Thu, 19 Apr 2018 10:07:07 -0400 Received: from sauhun.de ([88.99.104.3]:45322 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbeDSOG7 (ORCPT ); Thu, 19 Apr 2018 10:06:59 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id D2F4D3139C2; Thu, 19 Apr 2018 16:06:57 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH 22/61] input: mouse: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:52 +0200 Message-Id: <20180419140641.27926-23-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. 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.11.0