Message ID | 20230730204550.3402-1-W_Armin@gmx.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1676495vqg; Sun, 30 Jul 2023 14:58:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3rxAIbrJ/hP5QRS2kZ61BDkHlcwvhL9M1Gr9pVYd7lUT/pmkmTeqdNsb8DDqGy/lGVxnN X-Received: by 2002:a17:906:1d7:b0:992:3897:1985 with SMTP id 23-20020a17090601d700b0099238971985mr5750187ejj.43.1690754315337; Sun, 30 Jul 2023 14:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690754315; cv=none; d=google.com; s=arc-20160816; b=F9hDgqfdBC6FR9+kHN61DG1kkuz2eGZutqg7jb9mzUBRnf43DRcHplWHM3J0h2ej6m keUGD2Crp1g/XL/x/sAWIWJ6e303ydggqYal4J3QbA0S12PdBnL5K0zuKxUKB9LlD28G huGFO/Z4TWlUcIfaaI7CgcsKZgMfRp4EiN0cD1F1wjp9W5uHzgdxYwmeEsZb88z/0MUA 5VZyId94icJ77LpoiVRRyXykSz9X4QzwYvFU5GcHfqye46Ea7O23E6bcPlkZAIpO/4zU Gj7gocmNpIJzxwTbgxqockEgk1+9d97sqXtE19ljDXGIWBTk0v1m3XBeQZ3rLUz9vBrO Y63A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=MmAq/pl4LNBEZ69Zr2THf6x8zfNsLKLHvYr7T42fK0Y=; fh=e8SeHVBV39LDceUoMP3i4hF2US4qLv4cVQmQlOAT1Y4=; b=fh8DPX+pW4VMP5sM1N1JYbvaH20+VeZuSleje8xxA3QXBQAguftdyW7Db5k87fkBwj dF/fe0taOWrBnJYhwrfeWHib1LeCt16ypsenGglHuJSYAOyRY9AsE8rUzybUdeCmt15G W2yuCfgRhpn/l0XwGpIkDyX/9n6HNC3N8MGLBrKZLVusWSV+An5zlQuvhoFYMVMeA4HU mAkdPQBwp7nvX4cRQh1GPyNSSzgNUYnFKgMPM3cbY0e/JDg2PitPXNQ0koiFc3wztTBh EQ9iVjgavhcmmeumQAdauQm6CQhl44ECAFhR4pVPCBpWWNV2LCkA0cPEdO2aY5+IdYze R2ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cMYZTTYe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by23-20020a170906a2d700b00993320628absi6385429ejb.675.2023.07.30.14.58.11; Sun, 30 Jul 2023 14:58:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cMYZTTYe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229736AbjG3UqG (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Sun, 30 Jul 2023 16:46:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjG3UqE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 30 Jul 2023 16:46:04 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8098A10C0; Sun, 30 Jul 2023 13:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1690749954; x=1691354754; i=w_armin@gmx.de; bh=IymVS1AurKF6ATJhoVPi8imybDwrwwHRvHRqUSkvBug=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=cMYZTTYeB1OAcY1O3BDXtihV5qFsKJkeXxHAMW/zEdFkevRchUlmPfnowGu5O7EU2AhfNoS zfXbwmaE1JQH48ySzMBw/6EcUkxlxoBq2kYlyKrW4A2ZreU3UzOo71AvpZdlcD8iZ/D8WjrLX IJl7cbujxMEtTKNeK/AXZ7NGP4mcudXAu0fjY4s+Glrwfh40AtPg9tv1jtqS1n+c2H7gCfyXU nMDPH0Tides8G9DpF0yDkTt5kKC6zbZgTnnkcenyqwWKm9xb/RwWR0lyoHSvHOCHCW8NCv9z2 Wxc7XPiYLD4WnRh4wxqSzJqt/fnvI+J6dThuuz+PF4P92h5Q0bCA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVvPD-1qGYHU3MCz-00Rrp0; Sun, 30 Jul 2023 22:45:53 +0200 From: Armin Wolf <W_Armin@gmx.de> To: hdegoede@redhat.com, markgross@kernel.org, thomas@t-8ch.de Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] platform/x86: wmi-bmof: Use device_create_bin_file() Date: Sun, 30 Jul 2023 22:45:48 +0200 Message-Id: <20230730204550.3402-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:K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9A MLHiAW+lknMqWmVv/dPrPg4HY/bPK92JWzkL7T572/0cuG8HQ/CVFARsm25F+zVXn9Mbm+zs0 Kd15St6pXyDpCIk4QEdB2barW5Od+4pUcX/CLTwK6M6ij8mJTDKbwxIdySsdPiyEuHC8PIdd7 n6p9gDvDnjw5GnPErgL5U3xzwxw= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772884397333742236 X-GMAIL-MSGID: 1772884397333742236 |
Series |
[v3,1/3] platform/x86: wmi-bmof: Use device_create_bin_file()
|
|
Commit Message
Armin Wolf
July 30, 2023, 8:45 p.m. UTC
Use device_create_bin_file() instead of sysfs_create_bin_file() to avoid having to access the device kobject. Tested on a ASUS PRIME B650-PLUS. Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Armin Wolf <W_Armin@gmx.de> --- Changes since v1: - add Reviewed-by and Tested-by tags --- drivers/platform/x86/wmi-bmof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.39.2
Comments
Hi, On 7/30/23 22:45, Armin Wolf wrote: > Use device_create_bin_file() instead of sysfs_create_bin_file() > to avoid having to access the device kobject. > > Tested on a ASUS PRIME B650-PLUS. > > Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> > Tested-by: Thomas Weißschuh <linux@weissschuh.net> > Signed-off-by: Armin Wolf <W_Armin@gmx.de> Thank you for your patch-series, I've applied the series to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > Changes since v1: > - add Reviewed-by and Tested-by tags > --- > drivers/platform/x86/wmi-bmof.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c > index 80137afb9753..d0516cacfcb5 100644 > --- a/drivers/platform/x86/wmi-bmof.c > +++ b/drivers/platform/x86/wmi-bmof.c > @@ -75,7 +75,7 @@ static int wmi_bmof_probe(struct wmi_device *wdev, const void *context) > priv->bmof_bin_attr.read = read_bmof; > priv->bmof_bin_attr.size = priv->bmofdata->buffer.length; > > - ret = sysfs_create_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr); > + ret = device_create_bin_file(&wdev->dev, &priv->bmof_bin_attr); > if (ret) > goto err_free; > > @@ -90,7 +90,7 @@ static void wmi_bmof_remove(struct wmi_device *wdev) > { > struct bmof_priv *priv = dev_get_drvdata(&wdev->dev); > > - sysfs_remove_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr); > + device_remove_bin_file(&wdev->dev, &priv->bmof_bin_attr); > kfree(priv->bmofdata); > } > > -- > 2.39.2 >
diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c index 80137afb9753..d0516cacfcb5 100644 --- a/drivers/platform/x86/wmi-bmof.c +++ b/drivers/platform/x86/wmi-bmof.c @@ -75,7 +75,7 @@ static int wmi_bmof_probe(struct wmi_device *wdev, const void *context) priv->bmof_bin_attr.read = read_bmof; priv->bmof_bin_attr.size = priv->bmofdata->buffer.length; - ret = sysfs_create_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr); + ret = device_create_bin_file(&wdev->dev, &priv->bmof_bin_attr); if (ret) goto err_free; @@ -90,7 +90,7 @@ static void wmi_bmof_remove(struct wmi_device *wdev) { struct bmof_priv *priv = dev_get_drvdata(&wdev->dev); - sysfs_remove_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr); + device_remove_bin_file(&wdev->dev, &priv->bmof_bin_attr); kfree(priv->bmofdata); }