Re: [PATCH 02/17] staging: nuc-wmi: detect WMI API detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 16, 2021 at 12:53:30PM +0200, Mauro Carvalho Chehab wrote:
> -	leds = output[0];
> +	if (ver != LED_API_NUC6) {
> +		ret = nuc_nmi_cmd(dev, LED_VERSION_CONTROL, input, output);

Does this need to be checked?

	if (ret)
		return ret;

> +		ver = output[0] | output[1] << 16;
> +		if (!ver)
> +			ver = LED_API_REV_0_64;
> +		else if (ver == 0x0126)
> +			ver = LED_API_REV_1_0;
> +	}
> +
> +	/* Currently, only API Revision 0.64 is supported */
> +	if (ver != LED_API_REV_0_64)
> +		return -ENODEV;
> +
>  	if (!leds) {
>  		dev_warn(dev, "No LEDs found\n");
>  		return -ENODEV;

regards,
dan carpenter




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux