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 Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux