From patchwork Thu Dec 2 21:06:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 519995 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 C702BC433F5 for ; Thu, 2 Dec 2021 21:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355249AbhLBVJg (ORCPT ); Thu, 2 Dec 2021 16:09:36 -0500 Received: from mga06.intel.com ([134.134.136.31]:21392 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbhLBVJg (ORCPT ); Thu, 2 Dec 2021 16:09:36 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10186"; a="297633823" X-IronPort-AV: E=Sophos;i="5.87,282,1631602800"; d="scan'208";a="297633823" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2021 13:06:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,282,1631602800"; d="scan'208";a="597314378" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 02 Dec 2021 13:06:11 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B0007109; Thu, 2 Dec 2021 23:06:16 +0200 (EET) From: Andy Shevchenko To: Yihao Han , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek , Andy Shevchenko Subject: [PATCH v1 1/1] leds: tca6507: Get rid of duplicate of_node assignment Date: Thu, 2 Dec 2021 23:06:13 +0200 Message-Id: <20211202210613.78584-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove assignment here. For the details one may look into the of_gpio_dev_init() implementation. Signed-off-by: Andy Shevchenko --- drivers/leds/leds-tca6507.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index de8eed9b667d..1473ced8664c 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -641,9 +641,6 @@ static int tca6507_probe_gpios(struct device *dev, tca->gpio.direction_output = tca6507_gpio_direction_output; tca->gpio.set = tca6507_gpio_set_value; tca->gpio.parent = dev; -#ifdef CONFIG_OF_GPIO - tca->gpio.of_node = of_node_get(dev_of_node(dev)); -#endif err = gpiochip_add_data(&tca->gpio, tca); if (err) { tca->gpio.ngpio = 0;