Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1846335pxb; Mon, 20 Sep 2021 06:42:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeG1oTrIMplfPDqbd2VTLtBw1TePAZ4HqaEK7V12htkbIdhEx2q04PG95lc1HCF7OkX97/ X-Received: by 2002:a50:c949:: with SMTP id p9mr29709672edh.326.1632145360528; Mon, 20 Sep 2021 06:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632145360; cv=none; d=google.com; s=arc-20160816; b=eBTvXXxnVWj89696SlrGAeEdsHODofzx4FUDvro96kjpFjcryorqyLq6NPiWwnshWK 4n/i74S7DCitDW9IS9nLtf5cr1HTY4r+FW6JS8KWbtTSlvxV0nVkAXpbfLMfKmojzAkn BEdsskomtNCPWkwjGurU4SmFveVzabL5mUvn/Im3xEVZCsWgypZ01NS/XoMO4O0O7Qsf ezdJmzRDCUXlVlAnoPX0KyIRh/gAIxi1NgXFqzYRbng+315CbJk1rYg4z+9pbiCYP0Yt N+CF/6ntY+AoEO8FQalLAO804fzOOhDqFbQj0BcwPlz36iRUoaryhHmcU2o6aYFwCf1l qqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=njzI0eIPFoCrpbxUlOHfHLy4UCY0TWha38FcCSVahl8=; b=NyOKkOhbouQXa0CVmCtkmPa/+D0Fp60/UmEiJPvaQr9u8bs6SGM0DRLretAgqmXJT6 lmZd0cqsIhsUuTbiNpP6ULUgZPqM1RPFWuq3TMRkmOurqCdustcUfwkhxa5bJB3txTyh oxmXeN3ng7SH1I2zjJxzt3o64TIQJT/zlT+cMvA1smSf77wD91EqTHjKahPJQoiVaSkN j1HlbiORW2X2c3NTMG0/Mibetea9iQ2T1dK+qRxZX3Sm3+2E7Lm5o7kcROeYa5FSX1FB 7oG1i1CWjozy+we/+wVMq85CqLtL3BpnNo1eKI8nkuDSXeCLSePkfzaNLDjwVoTkn5Cg 2NeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=M3AVwcQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id my49si15094068ejc.46.2021.09.20.06.42.15; Mon, 20 Sep 2021 06:42:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=M3AVwcQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236225AbhITJIN (ORCPT + 99 others); Mon, 20 Sep 2021 05:08:13 -0400 Received: from www.zeus03.de ([194.117.254.33]:54214 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236103AbhITJHR (ORCPT ); Mon, 20 Sep 2021 05:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=FMuJqDCHzK4uHq kYECDzhFJ9tjA5iJrkLQtxJNEYXpE=; b=M3AVwcQtfiGfOsawZxa6RwHbrXn9r2 iAUDVtMNqHHXFfUJtfGRkAMd0UzYu6PDSXzvERcwTiqISvjajEWY8jyRw7yHd13b QNEmAXzxn7xErxMPYbimcsnxv8I8h8srBTTqHHiL5iuFNdDkBevr5BL9TeUf/Ju8 tNEKcsR3TkWmI= Received: (qmail 2412611 invoked from network); 20 Sep 2021 11:05:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:24 +0200 X-UD-Smtp-Session: l3s3148p1@FeDQlGnMCosgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH 2/9] firmware: meson: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:14 +0200 Message-Id: <20210920090522.23784-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get 'driver_data' 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. drivers/firmware/meson/meson_sm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 77aa5c6398aa..714016e3aab3 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -240,12 +240,11 @@ EXPORT_SYMBOL_GPL(meson_sm_get); static ssize_t serial_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); struct meson_sm_firmware *fw; uint8_t *id_buf; int ret; - fw = platform_get_drvdata(pdev); + fw = dev_get_drvdata(dev); id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL); if (!id_buf) -- 2.30.2