Message ID | 20231016161005.1471768-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3568454vqb; Mon, 16 Oct 2023 09:11:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLlxiwFoXSLjy0QKTTwqXTvgz25ITMNi/y5UETVY2Yx7Y3/C/3T1ZRdOowtuCw+Pg22SDd X-Received: by 2002:a05:6870:450b:b0:1ea:6883:99ff with SMTP id e11-20020a056870450b00b001ea688399ffmr1657019oao.5.1697472678939; Mon, 16 Oct 2023 09:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697472678; cv=none; d=google.com; s=arc-20160816; b=QEoKL3fOTfOEuJZdIcgojZeAvh9NblpbyzUtSqykpewyjemvsi7oh4/9EDWKRrHWOb 8xgaFAvFUZDXCG1msgy2NYQqoA6Rqa55Fn/FOM17F5jfMxRwsowtNnL54gqhXcxbm2/f qLUc96lbHO6SsTpz/1p6BI540VI6eyghYRViS8+C/8GmfQvDcSwUHjORmOE55sOqmbdY sE0gfKYTi1OjNLadSiqgpSIG/XiWvk4USxwn5+XqXeogqG8YvdXWStesDHeLxvUOZImC 5Q3Bq9hTuv/9nom6KTkP21uiEB4uWdPBMbowufsKixkdr9AlTJpiwHa0LTjWV3V66FOS +D9Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=B/oz0uODugJGDz2wuzGYNvP+VRKjoNuxnRKjcNeKNdc=; fh=tUAC4oQq3UuKajr6ZMoB53sspoioCuMU4y0NrDbDhac=; b=QAm9JqkfpYNH2kmLfFTG+zgs7t1QH6O+xCM+yfknMgOwCjTSS0KxobZWQrgf1APcl5 SsfGLSRZjxBFnthfR6M12Mf8a71gU0gb1RtBMNOuZfdt3IKMdwK+UOtEamd2t5B6lp22 9wSPveOlDZ1ylqP4zx5+BFYBG8qM5ZmCzXxa9ksgpm9HVBWrSHo9jRTHWSvxlmCswPy6 ucPJdd1AAx1Q1ggeUw6ote9YSLZE0SVvnBXsYth1K0vGwfzlXGM/b7onDAPHqKqpt78N 844M9DZS3rJ0QdIUyiEi0ML4WA17VaYDy4sYiNTBmkE/V3lsVdTaGn6Z+wJKPx+8iMSv RZrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cUW8pk80; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j63-20020a638042000000b005aaf48ab88csi7914996pgd.197.2023.10.16.09.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:11:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cUW8pk80; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BAEBE8023AC8; Mon, 16 Oct 2023 09:10:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232816AbjJPQKP (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 12:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjJPQKO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 12:10:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C2BAB; Mon, 16 Oct 2023 09:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697472612; x=1729008612; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yOQZfIm040lvmUe2O+DKvT56T78+nm6brIphWp/oItE=; b=cUW8pk80y+3RVyF2reTjUK0cZQ/eEVQZx9bpLrGm4HCPjQq4ACx9QHyx 1u1GXvX7FqRpRnO1cVkZ9ieaUW5KnOdK+ymVRROhfFPBgVIfvRXRpcKEl lhzo5K2D6fHgh8U/JafKsydheZr86jKw0/eAEAIn83bbTBarrc7T+qRro JsB1vS1VvbhojUHkLs9p5FmSwMxBaYDXhrUs1lSFMDCOTtQooWNgSAHV6 ZUg24PvcsgJrdWO0JY5IwWOJRf3cpsp0HnFEPxrkP+T9ZSJD7160sTLwB KWrWECe2OERkRYSBh31xGEoFClDeo8yjt7GmM1kDg3wTuI0hDMeQTsSMG w==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="4175721" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="4175721" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 09:10:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="1087124866" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="1087124866" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 16 Oct 2023 09:10:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EA49781C; Mon, 16 Oct 2023 19:10:08 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org> Subject: [PATCH v1 1/6] leds: gpio: Keep driver firmware interface agnostic Date: Mon, 16 Oct 2023 19:10:00 +0300 Message-Id: <20231016161005.1471768-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 09:10:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779929111373676452 X-GMAIL-MSGID: 1779929111373676452 |
Series |
[v1,1/6] leds: gpio: Keep driver firmware interface agnostic
|
|
Commit Message
Andy Shevchenko
Oct. 16, 2023, 4:10 p.m. UTC
The of.h is used as a proxy to mod_devicetable, replace former by
latter.
The commit 2d6180147e92 ("leds: gpio: Configure per-LED pin control")
added yet another unneeded OF APIs. Replace with direct use of fwnode.
Altogether this makes driver agnostic to the firmware interface in use.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/leds/leds-gpio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Mon, 16 Oct 2023 19:10:00 +0300, Andy Shevchenko wrote: > The of.h is used as a proxy to mod_devicetable, replace former by > latter. > > The commit 2d6180147e92 ("leds: gpio: Configure per-LED pin control") > added yet another unneeded OF APIs. Replace with direct use of fwnode. > > Altogether this makes driver agnostic to the firmware interface in use. > > [...] Applied, thanks! [1/6] leds: gpio: Keep driver firmware interface agnostic commit: 04262082e2c203e6834bf65c7a46e2eadf212c66 [2/6] leds: gpio: Utilise PTR_ERR_OR_ZERO() commit: 36d270892d4733439d3fd5b713ef07029aae1bf4 [3/6] leds: gpio: Refactor code to use devm_gpiod_get_index_optional() commit: 4c5f908c04fda867c8130087a628a1bccec3fb05 [4/6] leds: gpio: Move temporary variable for struct device to gpio_led_probe() commit: 087da384361247adeb894dcb38fbbec8d4d53790 [5/6] leds: gpio: Remove unneeded assignment commit: cdae3873bb328fbc690722b76b67f00213c92ade [6/6] leds: gpio: Update headers commit: 1f313de42c4ff9b590f00d747bab25adc0cb011c -- Lee Jones [李琼斯]
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index a6597f0f3eb4..debadb48ceda 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -11,8 +11,8 @@ #include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/leds.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <linux/property.h> @@ -129,8 +129,8 @@ static int create_gpio_led(const struct gpio_led *template, ret = PTR_ERR(pinctrl); if (ret != -ENODEV) { dev_warn(led_dat->cdev.dev, - "Failed to select %pOF pinctrl: %d\n", - to_of_node(fwnode), ret); + "Failed to select %pfw pinctrl: %d\n", + fwnode, ret); } else { /* pinctrl-%d not present, not an error */ ret = 0;