Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp170631pxk; Wed, 9 Sep 2020 02:10:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUkUaZ7+wDAyyuetzBrzJza80poTSzydf0Z/T8tT+a8zfsus4UOjshhc55iYdaY0N9EqUe X-Received: by 2002:a05:6402:b0f:: with SMTP id bm15mr2995191edb.388.1599642613830; Wed, 09 Sep 2020 02:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599642613; cv=none; d=google.com; s=arc-20160816; b=gGeQnc8gMGOcOjoNHGgUO8LtSWNVp9k1K8HfbQBXX81HMGrj/7W9uI1gsLTCslDbwW gMg6zbzt0Ysjg4gy8qGdGjq+q8EXi9TS5krLsGFo2C014tz1yaPMxrprqsTJSzdqAr6L CMjn8rAFuyPVuV/+/jtpjAx78AL5BUqgIw4zqBbpcdS5qnTyRjo3saLNYWNjKMuSI/SU oiT9GBuCEsPgRcqD05uD+FFxaILY/ZIYUdwWpySoCGrdCeRdq9GFPQs90Y5cMHNlLhXy CnaJoK5WlhxN9E6KLm82P7E0mnxAEZfUscfZcNVc3yTveh9JRNr5N6YiUYQ172iHEYMP sj9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=C/E6WHnX6d79bDdapPNPREsQUz8N5S692+W6UhvNvuQ=; b=CofRuGpgRdSoZMZ6BJMLNLWdixs/6OpTOzBKbkUXddmnV9D2APhigVVSKXeTb762ma 4eS/s8n2cbJrKig8tGs6F2xFpUlhcGSititbFNEKI52yRDNH6GrBgo9Hbep+q1H5tUKf 8OmqhJIRXj45L4eXzjOduJ8IzJCKifTdtnv1jxg7wuqE9QgU+eSBTTRXiQ/67923yFyQ xowr17zCHVhqy2fl3r/dn0s414/+em1qj3o9eNZZsp3qSkqetqNt5RRA3WkKZl5lRMv+ /zIC9g087Q4a2ed1KfMAIXXlO/4xDKuC3oLFFRXfU6+jJqzbieGWA0a3RgfzFKQSoObg uBOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si1345200edb.142.2020.09.09.02.09.50; Wed, 09 Sep 2020 02:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbgIIJHo (ORCPT + 99 others); Wed, 9 Sep 2020 05:07:44 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:52210 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgIIJHk (ORCPT ); Wed, 9 Sep 2020 05:07:40 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id AFE871C0B8F; Wed, 9 Sep 2020 11:07:37 +0200 (CEST) Date: Wed, 9 Sep 2020 11:07:36 +0200 From: Pavel Machek To: Alexander Dahl Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, Jacek Anaszewski , Dan Murphy , Rob Herring , linux-kernel@vger.kernel.org, Alexander Dahl Subject: Re: [PATCH v3 1/2] leds: pwm: Allow automatic labels for DT based devices Message-ID: <20200909090736.GE10891@amd> References: <20200907043459.2961-1-post@lespocky.de> <20200907043459.2961-2-post@lespocky.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wchHw8dVAp53YPj8" Content-Disposition: inline In-Reply-To: <20200907043459.2961-2-post@lespocky.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wchHw8dVAp53YPj8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > pwm_init_state(led_data->pwm, &led_data->pwmstate); > =20 > - ret =3D devm_led_classdev_register(dev, &led_data->cdev); > + if (fwnode) { > + init_data.fwnode =3D fwnode; > + ret =3D devm_led_classdev_register_ext(dev, &led_data->cdev, > + &init_data); > + } else { > + ret =3D devm_led_classdev_register(dev, &led_data->cdev); > + } Can you always use _ext version, even with null fwnode? If not, can you fix the core to accept that? Having that conditional in driver is ugly. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --wchHw8dVAp53YPj8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl9Ym1gACgkQMOfwapXb+vLs4wCggaBNQOb2qvudwfdBW1U0Gr+p HVQAn2/bC58RWEIDRGUv8GBV/L9xDpf1 =vIz3 -----END PGP SIGNATURE----- --wchHw8dVAp53YPj8--