On Fri, Feb 20, 2015 at 04:07:35PM +0100, Cédric Le Goater wrote:

You should explain here why this patch is needed.

> Signed-off-by: Cédric Le Goater <c...@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");
> -- 
> 1.7.10.4
> 
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to