Re: [PATCH v2 1/3] input: sc27xx: Add support for sc2730 and sc2721

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

 



Hi Chunyan,

On Tue, Nov 17, 2020 at 11:49:47AM +0800, Chunyan Zhang wrote:
> @@ -78,8 +112,15 @@ static void sc27xx_vibra_close(struct input_dev *input)
>  static int sc27xx_vibra_probe(struct platform_device *pdev)
>  {
>  	struct vibra_info *info;
> +	const struct sc27xx_vibra_data *data;
>  	int error;
>  
> +	data = of_device_get_match_data(&pdev->dev);
> +	if (!data) {
> +		dev_err(&pdev->dev, "no matching driver data found\n");
> +		return -EINVAL;
> +	}

This does not have to be OF-specific, so I changed it to
device_get_match_data() and applied, thank you.

-- 
Dmitry



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux