[prev in list] [next in list] [prev in thread] [next in thread]
List: lm-sensors
Subject: Re: [lm-sensors] [RFC PATCH 1/3] powerpc/powernv: Check OPAL sensor calls exist
From: Cedric Le Goater <clg () fr ! ibm ! com>
Date: 2015-02-25 17:28:05
Message-ID: 54EE0625.7050604 () fr ! ibm ! com
[Download RAW message or body]
On 02/24/2015 05:54 AM, Michael Ellerman wrote:
> On Fri, 2015-02-20 at 16:07 +0100, Cédric Le Goater wrote:
> > Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
> > ---
> > arch/powerpc/platforms/powernv/opal-sensor.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/powerpc/platforms/powernv/opal-sensor.c \
> > b/arch/powerpc/platforms/powernv/opal-sensor.c index 4ab67ef7abc9..544292f2020f \
> > 100644
> > --- a/arch/powerpc/platforms/powernv/opal-sensor.c
> > +++ b/arch/powerpc/platforms/powernv/opal-sensor.c
> > @@ -72,6 +72,9 @@ static __init int opal_sensor_init(void)
> > struct platform_device *pdev;
> > struct device_node *sensor;
> >
> > + if (!opal_check_token(OPAL_SENSOR_READ))
> > + return -ENODEV;
> > +
> > sensor = of_find_node_by_path("/ibm,opal/sensors");
> > if (!sensor) {
> > pr_err("Opal node 'sensors' not found\n");
>
> Are you actually seeing this in practice?
No. Not this one. I have seen others though. I will send you patches.
> It's a bit annoying that we have to check for the token, and then also check
> the device tree. It would be nice if one implied the presence of the other.
Should we expose the OPAL call token in the device tree ?
Cheers,
C.
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic