From patchwork Mon Oct 16 16:10:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 734167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBC54CDB474 for ; Mon, 16 Oct 2023 16:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbjJPQKO (ORCPT ); Mon, 16 Oct 2023 12:10:14 -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 ); 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 To: Andy Shevchenko , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek , Lee Jones 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 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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 --- drivers/leds/leds-gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 #include #include +#include #include -#include #include #include #include @@ -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;