Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp442650ybb; Wed, 1 Apr 2020 03:09:40 -0700 (PDT) X-Google-Smtp-Source: APiQypLdNpqCyodeIiKUdTaqbs8+FI1NPHczfqipiuq2gqqzjnnAzrOGiZ/Q01KU+UBN0EDonoIu X-Received: by 2002:a4a:271d:: with SMTP id l29mr1086013oof.18.1585735780141; Wed, 01 Apr 2020 03:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585735780; cv=none; d=google.com; s=arc-20160816; b=SOSwNoT3VlZLQS+RTCUipg9HGmpsDclvnHBPJ4S98YndOVYMCGwMVuIORiAnxur9LT pazVjIWHWn2w5l27jhVyg9aMM5runnkTx1Ohq57QNhEFbgnR/KJ9WtRNQ59naLNKtBdv 6Ow3aWTFIV1vRH5zIJuyP6dlUn4bFke/cLc6GLfu53ATuBw+5ePv+IcRC4lzSz7vnECy GHe121VXczSLILRocGwqL9WQoONPYyYWfYUWoessKSy75pFAH60+vYPxs0gs5+knYiZm YkmjeANjTAGitFTbvst79y/9nX8Tb6nCGlmgGcwvk8a5t+G3+lfvJKR5dypikdZpXfqg t0dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ZCD5e/zJXmKAX2xCPUbGFpEcZHshYsLsh9gx/j5UW0I=; b=lUObbosD0g06bykEjpuL+6FjNHb1HgSL5dBC1iyYMmoMQ6D4vMANwhuDXOK334+quf QIE0G46JRj/CAYnobbbz4Hkje7HfZJKLbXxiMw3n8nws7rLE9TKq7MfXLU+HbsTsuSUU OIlZJFb0CRKoAIMWfa1kmffWfK7doedcZ4e/FYRIwHM8lPgor3M3HBx1QERwdI/dgdYj SktgOeCjO8AZzGeMABaKSdiHfs1xz0CvwyTb4Tdw+eC3kr2F48Z00Pu87nCDT141BLB4 xeLB//tUMOAfhc5dokPSvbnEMI0HD+3LTp9sm1uA/+ZcSgEEedE7VDamdpLd3WjwvCOt B3Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t140si732923oif.99.2020.04.01.03.09.27; Wed, 01 Apr 2020 03:09:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbgDAJvy (ORCPT + 99 others); Wed, 1 Apr 2020 05:51:54 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40981 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgDAJvy (ORCPT ); Wed, 1 Apr 2020 05:51:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id h9so29737142wrc.8; Wed, 01 Apr 2020 02:51:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZCD5e/zJXmKAX2xCPUbGFpEcZHshYsLsh9gx/j5UW0I=; b=bi80T+giF68sM8ftFWK9bZPS+hpjXMmcYzSpq1NJje2+6fFydWLm51hR3sCeLTwMBl iQuvSilcSJTLG+lxHWSyZPu8UDAma/VLD6BlQAM9PWvHQUpFOiqCkbikf3FAhdxfUkbi kU5NVIKN/ujxtNU/cN8sGuYh4fASqGaAOCDioUVIo4xth3V5AkGdpGdBnIKc9PPl+dq1 58ZJK6HQM1Mkurm6xRGDdGaGpMtRkmImZ6LKTGs6AruxtuzivcvaUrjeC3Stq+OGjKTv hFSjBH33xEk2pEkAnNl6whAmroKh6ZGrVjhFAGwdpVbC5btZL++pHHqLMN8CAEy8iCnJ mndg== X-Gm-Message-State: ANhLgQ0aZc+4Py+5HwoYOrbbFiez6clMPblPPpdjDZXVMz2/2xP8XYA6 6kj0iw5P207lh7r5ovqRtuA= X-Received: by 2002:a5d:630e:: with SMTP id i14mr25120880wru.260.1585734711210; Wed, 01 Apr 2020 02:51:51 -0700 (PDT) Received: from piling.lan (80-71-134-83.u.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id d7sm2154635wrr.77.2020.04.01.02.51.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 02:51:50 -0700 (PDT) From: Ricardo Ribalda Delgado To: Jacek Anaszewski , Pavel Machek , Dan Murphy , Linus Walleij , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH] leds: core: Fix warning message when init_data Date: Wed, 1 Apr 2020 11:51:47 +0200 Message-Id: <20200401095147.444353-1-ribalda@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The warning message when a led is renamed due to name collition can fail to show proper original name if init_data is used. Eg: [ 9.073996] leds-gpio a0040000.leds_0: Led (null) renamed to red_led_1 due to name collision Fixes: bb4e9af0348d ("leds: core: Add support for composing LED class device names") Signed-off-by: Ricardo Ribalda Delgado --- drivers/leds/led-class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index 1fc40e8af75e..3363a6551a70 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c @@ -376,7 +376,7 @@ int led_classdev_register_ext(struct device *parent, if (ret) dev_warn(parent, "Led %s renamed to %s due to name collision", - led_cdev->name, dev_name(led_cdev->dev)); + proposed_name, dev_name(led_cdev->dev)); if (led_cdev->flags & LED_BRIGHT_HW_CHANGED) { ret = led_add_brightness_hw_changed(led_cdev); -- 2.25.1