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

Reply via email to