[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKYiA1ACTXSg2RubWEq-ETXpfZaF7BCYgGHL66PyHL=nGPt9ew@mail.gmail.com>
Date: Thu, 19 Jan 2023 18:17:26 -0500
From: Dennis Lambe <dennis@...rkcharge.io>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Alessandro Zummo <a.zummo@...ertech.it>,
Atsushi Nemoto <atsushi.nemoto@...d.co.jp>,
Gary Bisson <gary.bisson@...ndarydevices.com>,
Javier Martinez Canillas <javier@....samsung.com>,
Troy Kisky <troy.kisky@...ndarydevices.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rtc@...r.kernel.org
Subject: Re: [PATCH v3 1/3] rtc: m41t80: probe: use IS_ENABLED for CONFIG_OF
On Thu, Jan 19, 2023 at 5:21 PM Alexandre Belloni
<alexandre.belloni@...tlin.com> wrote:
> > -#ifdef CONFIG_OF
> > - wakeup_source = of_property_read_bool(client->dev.of_node,
> > - "wakeup-source");
> > -#endif
> > + if (IS_ENABLED(CONFIG_OF)) {
> > + wakeup_source = of_property_read_bool(client->dev.of_node,
> > + "wakeup-source");
> > + }
> > +
>
> A way better patch would switch to fwnode_property_read_bool
If you like that better, I'll make sure that's how I do it in future
revs of the patchset. I didn't know if it was appropriate since I
don't know if it would ever make sense to call acpi_dev_prop_get on
"wakeup-source" or "quartz-load-femtofarads", or if that kind of
consideration should even matter when choosing to use fwnode_* instead
of of_*.
--
Dennis Lambe (He/Him)
Lead Firmware Engineer
sparkcharge.io
Powered by blists - more mailing lists