Patch "Input: ads7846 - Fix usage of match data" has been added to the 6.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    Input: ads7846 - Fix usage of match data

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-ads7846-fix-usage-of-match-data.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 8f7913c04f6a7b90bcf998ece17395d7090f6d44 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@xxxxxxxxxx>
Date: Tue, 6 Jun 2023 21:13:04 +0200
Subject: Input: ads7846 - Fix usage of match data

From: Linus Walleij <linus.walleij@xxxxxxxxxx>

commit 8f7913c04f6a7b90bcf998ece17395d7090f6d44 upstream.

device_get_match_data() returns the match data directly, fix
this up and fix the probe crash.

Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Acked-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Link: https://lore.kernel.org/r/20230606191304.3804174-1-linus.walleij@xxxxxxxxxx
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/input/touchscreen/ads7846.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1117,20 +1117,13 @@ MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
 static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
 {
 	struct ads7846_platform_data *pdata;
-	const struct platform_device_id *pdev_id;
 	u32 value;
 
-	pdev_id = device_get_match_data(dev);
-	if (!pdev_id) {
-		dev_err(dev, "Unknown device model\n");
-		return ERR_PTR(-EINVAL);
-	}
-
 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
 		return ERR_PTR(-ENOMEM);
 
-	pdata->model = (unsigned long)pdev_id->driver_data;
+	pdata->model = (u32)device_get_match_data(dev);
 
 	device_property_read_u16(dev, "ti,vref-delay-usecs",
 				 &pdata->vref_delay_usecs);


Patches currently in stable-queue which might be from linus.walleij@xxxxxxxxxx are

queue-6.4/arm-omap1-exorcise-the-legacy-gpio-header.patch
queue-6.4/arm-dts-qcom-msm8660-fix-regulator-node-names.patch
queue-6.4/arm-gpio-push-omap2-quirk-down-into-twl4030-driver.patch
queue-6.4/arm-mmc-convert-old-mmci-omap-to-gpio-descriptors.patch
queue-6.4/arm-omap1-remove-reliance-on-gpio-numbers-from-palmt.patch
queue-6.4/pinctrl-sunplus-add-check-for-kmalloc.patch
queue-6.4/input-ads7846-fix-usage-of-match-data.patch
queue-6.4/mfd-rt5033-drop-rt5033-battery-sub-device.patch
queue-6.4/pinctrl-npcm7xx-add-missing-check-for-ioremap.patch
queue-6.4/arm-omap1-remove-reliance-on-gpio-numbers-from-sx1.patch
queue-6.4/pinctrl-at91-pio4-check-return-value-of-devm_kasprin.patch
queue-6.4/arm-mfd-gpio-fixup-tps65010-regression-on-omap1-osk1.patch
queue-6.4/pci-ftpci100-release-the-clock-resources.patch
queue-6.4/input-ads7846-convert-to-use-software-nodes.patch
queue-6.4/pinctrl-at91-fix-a-couple-null-vs-is_err-checks.patch
queue-6.4/pinctrl-bcm2835-handle-gpiochip_add_pin_range-errors.patch
queue-6.4/arm-omap1-fix-up-the-nokia-770-board-device-irqs.patch
queue-6.4/arm-musb-omap2-remove-global-gpio-numbers-from-tusb6.patch
queue-6.4/mfd-stmpe-only-disable-the-regulators-if-they-are-en.patch
queue-6.4/arm-omap2-get-usb-hub-reset-gpio-from-descriptor.patch
queue-6.4/pinctrl-microchip-sgpio-check-return-value-of-devm_k.patch
queue-6.4/pinctrl-tegra-duplicate-pinmux-functions-table.patch
queue-6.4/arm-omap1-drop-header-on-ams-delta.patch
queue-6.4/mmc-mmci-set-probe_prefer_asynchronous.patch
queue-6.4/pinctrl-freescale-fix-a-memory-out-of-bounds-when-nu.patch
queue-6.4/arm-omap2-rewrite-wlan-quirk-to-use-gpio-descriptors.patch
queue-6.4/pinctrl-sunplus-add-check-for-kmalloc.patch-3132
queue-6.4/pwm-ab8500-fix-error-code-in-probe.patch
queue-6.4/arm-omap1-make-serial-wakeup-gpios-use-descriptors.patch
queue-6.4/net-dsa-vsc73xx-fix-mtu-configuration.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux