summaryrefslogtreecommitdiff
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-11 10:57:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-11 10:57:11 -0700
commit4f0237062ca70c8e34e16e518aee4b84c30d1832 (patch)
tree117272a42446c2ebd12d9786f52adbeb059cae95 /drivers/input/serio
parent6bc3fe8e7e172d5584e529a04cf9eec946428768 (diff)
parent44fc95e218a09d7966a9d448941fdb003f6bb69f (diff)
downloadlinux-next-4f0237062ca70c8e34e16e518aee4b84c30d1832.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - update the ili210x touchscreen driver, refreshing the code and adding support for ILI251X line - add support for st1633 to the st1232 touchscreen driver - add support for sx8650 to the the sx8654 touchscreen driver - add support for Evervision FT5726 to the edt-ft5x06 touchscreen driver - add support for gt5688 to the Goodix touchscreen driver - new vibrator driver for MSM SOCs - miscellaneous fixes for the rest of input drivers * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (53 commits) Input: wacom_serial4 - add support for Wacom ArtPad II tablet Input: elan_i2c - add id for touchpad found in Lenovo s21e-20 Input: raspberrypi-ts - select CONFIG_INPUT_POLLDEV Input: msm-vibrator - use correct gpio header Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev' Input: i8042 - rework DT node name comparisons Input: goodix - print values in case of inconsistencies Input: goodix - refer to touchscreen.txt in device tree bindings Input: goodix - support Goodix gt5688 Input: synaptics_i2c - remove redundant spinlock Input: db9 - mark expected switch fall-through Input: qt2160 - remove redundant spinlock Input: st1232 - handle common DT bindings Input: ims-pcu - switch to using brightness_set_blocking() Input: st1232 - switch to gpiod API Input: ili210x - fetch touchscreen geometry from DT Input: msm-vibrator - tweak an error message Input: tm2-touchkey - acknowledge that setting brightness is a blocking call Input: stmfts - acknowledge that setting brightness is a blocking call Input: ili210x - switch to using devm_device_add_group() ...
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/i8042-sparcio.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 796289846204..fce76812843b 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -53,12 +53,11 @@ static struct resource *kbd_res;
static int sparc_i8042_probe(struct platform_device *op)
{
- struct device_node *dp = op->dev.of_node;
+ struct device_node *dp;
- dp = dp->child;
- while (dp) {
- if (!strcmp(dp->name, OBP_PS2KBD_NAME1) ||
- !strcmp(dp->name, OBP_PS2KBD_NAME2)) {
+ for_each_child_of_node(op->dev.of_node, dp) {
+ if (of_node_name_eq(dp, OBP_PS2KBD_NAME1) ||
+ of_node_name_eq(dp, OBP_PS2KBD_NAME2)) {
struct platform_device *kbd = of_find_device_by_node(dp);
unsigned int irq = kbd->archdata.irqs[0];
if (irq == 0xffffffff)
@@ -67,16 +66,14 @@ static int sparc_i8042_probe(struct platform_device *op)
kbd_iobase = of_ioremap(&kbd->resource[0],
0, 8, "kbd");
kbd_res = &kbd->resource[0];
- } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
- !strcmp(dp->name, OBP_PS2MS_NAME2)) {
+ } else if (of_node_name_eq(dp, OBP_PS2MS_NAME1) ||
+ of_node_name_eq(dp, OBP_PS2MS_NAME2)) {
struct platform_device *ms = of_find_device_by_node(dp);
unsigned int irq = ms->archdata.irqs[0];
if (irq == 0xffffffff)
irq = op->archdata.irqs[0];
i8042_aux_irq = irq;
}
-
- dp = dp->sibling;
}
return 0;
@@ -109,8 +106,9 @@ static struct platform_driver sparc_i8042_driver = {
static int __init i8042_platform_init(void)
{
struct device_node *root = of_find_node_by_path("/");
+ const char *name = of_get_property(root, "name", NULL);
- if (!strcmp(root->name, "SUNW,JavaStation-1")) {
+ if (name && !strcmp(name, "SUNW,JavaStation-1")) {
/* Hardcoded values for MrCoffee. */
i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
kbd_iobase = ioremap(0x71300060, 8);
@@ -139,8 +137,9 @@ static int __init i8042_platform_init(void)
static inline void i8042_platform_exit(void)
{
struct device_node *root = of_find_node_by_path("/");
+ const char *name = of_get_property(root, "name", NULL);
- if (strcmp(root->name, "SUNW,JavaStation-1"))
+ if (!name || strcmp(name, "SUNW,JavaStation-1"))
platform_driver_unregister(&sparc_i8042_driver);
}