Merge branch 'i2c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[sfrench/cifs-2.6.git] / drivers / input / mouse / elantech.c
index 97381e2e03bae90df7b8f0a9367be68a8dc1363d..2d0bc029619ff9e1e37daf062cd79b56e7b6a045 100644 (file)
@@ -1885,8 +1885,6 @@ static int elantech_create_smbus(struct psmouse *psmouse,
        };
        unsigned int idx = 0;
 
-       smbus_board.properties = i2c_props;
-
        i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-size-x",
                                                   info->x_max + 1);
        i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-size-y",
@@ -1918,6 +1916,10 @@ static int elantech_create_smbus(struct psmouse *psmouse,
        if (elantech_is_buttonpad(info))
                i2c_props[idx++] = PROPERTY_ENTRY_BOOL("elan,clickpad");
 
+       smbus_board.fwnode = fwnode_create_software_node(i2c_props, NULL);
+       if (IS_ERR(smbus_board.fwnode))
+               return PTR_ERR(smbus_board.fwnode);
+
        return psmouse_smbus_init(psmouse, &smbus_board, NULL, 0, false,
                                  leave_breadcrumbs);
 }