Thread (9 messages) 9 messages, 3 authors, 2020-12-12

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

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2020-12-12 03:05:50
Also in: linux-input, lkml

Hi Chunyan,

On Tue, Nov 17, 2020 at 11:49:47AM +0800, Chunyan Zhang wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help