Received: by 10.192.165.156 with SMTP id m28csp766707imm; Thu, 19 Apr 2018 07:15:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx48yXoBnG2HqVbrJhoWMc6l8/2Plks1qkX6o0PQuni7NLJWwlTZ5NlCs4x3cc3DZUEC8vvmI X-Received: by 2002:a17:902:7d86:: with SMTP id a6-v6mr6481226plm.264.1524147316535; Thu, 19 Apr 2018 07:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147316; cv=none; d=google.com; s=arc-20160816; b=llFwX+yA1meCz7Fp7etYaB6WK/FyxNltIi9RsXFIczmYzXcDzYkzZG79Oq4IYfLVN/ e91pMnaZUeedSjDgOKRKonIjbUmlL6SYGWbSQKwWM4N+67FASQnUrXJZuEpynmT/etZV PgE5vNT9JzptkB9L4E9lhW8pnCIuilG60BACgPPWJkZ3RgdZVL11e+bx2kCEYgCUCh8h B8ndePzByvwX/AFzUuXXOo+NGEAxZ3nIGRpklEuNzUls8YugWeKz9FV8Ymp2chUHU3/x ZEbcNJPJv8uC6T6SXEYr+ken9BMa4LXbWUNLxgs6Yt55difdqxFWHOqx1W9blS98ttgc HD3A== 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=tWHQ2qipfbtJh5mUZcRym/6sjPv3YOU2O5AF1yFwkHo=; b=G2iU5KSr+UgOMAWHRsPyO1SfcRq7ROj7wFiKd+JGnpYpuyJw/c6Hbjhpg4Py0UuLKo UjtcFxs68fAcoJ0ZwrZzv/wmidbOrvjvlqUeOMpD/tifkpSnt5vPDPeRKvVobc15tPDq QormN1+KiXFGfqBo/Og/KoP1JjI597K+DFqahK+HK0++FGMYv9+4bzbhU5vatbNDkGfX qn21eYyrzvijtbxBdpAnKrTc9HWA2JdHZvSEQ4rweW9qpa0cHHr3CWnkwy+frnKXYOeS Va0JKrp9VlhFmQhaffr0HhHanGnN6r1K9YvBd92piF+D3eHgDOIx8dCQCNJsTbqwiPMz w53w== 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 n17si2450137pfa.187.2018.04.19.07.15.02; Thu, 19 Apr 2018 07:15:16 -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 S1753862AbeDSOMz (ORCPT + 99 others); Thu, 19 Apr 2018 10:12:55 -0400 Received: from sauhun.de ([88.99.104.3]:45270 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753543AbeDSOHK (ORCPT ); Thu, 19 Apr 2018 10:07:10 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 912E83139D4; Thu, 19 Apr 2018 16:07:09 +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 , Vaibhav Hiremath , Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org Subject: [PATCH 47/61] staging: greybus: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:17 +0200 Message-Id: <20180419140641.27926-48-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/staging/greybus/arche-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 83254a72a7bb..8fe8b6e35432 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -315,8 +315,7 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct arche_platform_drvdata *arche_pdata = platform_get_drvdata(pdev); + struct arche_platform_drvdata *arche_pdata = dev_get_drvdata(dev); int ret = 0; mutex_lock(&arche_pdata->platform_state_mutex); -- 2.11.0