From: Stephen Rothwell Date: Wed, 14 Apr 2021 06:33:08 +0000 (+1000) Subject: Merge remote-tracking branch 'driver-core/driver-core-next' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7218e72358b25eb615587b8444b6eb0b25d71547;p=users%2Fjedix%2Flinux-maple.git Merge remote-tracking branch 'driver-core/driver-core-next' # Conflicts: # drivers/of/property.c --- 7218e72358b25eb615587b8444b6eb0b25d71547 diff --cc drivers/base/dd.c index 37a5e5f8b221,2f00d1d5b414..ecd7cf848daf --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@@ -292,8 -299,10 +299,10 @@@ int driver_deferred_probe_check_state(s static void deferred_probe_timeout_work_func(struct work_struct *work) { - struct device_private *private, *p; + struct device_private *p; + fw_devlink_drivers_done(); + driver_deferred_probe_timeout = 0; driver_deferred_probe_trigger(); flush_work(&deferred_probe_work); diff --cc drivers/of/property.c index 1793303e84ac,2bb3158c9e43..6c028632f425 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@@ -1243,7 -1230,8 +1248,8 @@@ static struct device_node *parse_##fnam * @parse_prop.prop_name: Name of property holding a phandle value * @parse_prop.index: For properties holding a list of phandles, this is the * index into the list - * @optional: The property can be an optional dependency. + * @optional: Describes whether a supplier is mandatory or not + * @node_not_dev: The consumer node containing the property is never a device. * * Returns: * parse_prop() return values are @@@ -1279,18 -1268,10 +1286,19 @@@ DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5 DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL) DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL) DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL) + DEFINE_SIMPLE_PROP(remote_endpoint, "remote-endpoint", NULL) DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") -DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells") + +static struct device_node *parse_gpios(struct device_node *np, + const char *prop_name, int index) +{ + if (!strcmp_suffix(prop_name, ",nr-gpios")) + return NULL; + + return parse_suffix_prop_cells(np, prop_name, index, "-gpios", + "#gpio-cells"); +} static struct device_node *parse_iommu_maps(struct device_node *np, const char *prop_name, int index) diff --cc drivers/power/supply/sbs-battery.c index 4bf92831cb06,70ea404b2a36..8d7a10730e43 --- a/drivers/power/supply/sbs-battery.c +++ b/drivers/power/supply/sbs-battery.c @@@ -1156,12 -1159,17 +1157,15 @@@ skip_gpio rc = sbs_get_battery_presence_and_health( client, POWER_SUPPLY_PROP_PRESENT, &val); - if (rc < 0 || !val.intval) { - dev_err(&client->dev, "Failed to get present status\n"); - rc = -ENODEV; - goto exit_psupply; - } + if (rc < 0 || !val.intval) + return dev_err_probe(&client->dev, -ENODEV, + "Failed to get present status\n"); } - INIT_DELAYED_WORK(&chip->work, sbs_delayed_work); + rc = devm_delayed_work_autocancel(&client->dev, &chip->work, + sbs_delayed_work); + if (rc) + return rc; chip->power_supply = devm_power_supply_register(&client->dev, sbs_desc, &psy_cfg); @@@ -1173,17 -1184,11 +1177,8 @@@ "%s: battery gas gauge device registered\n", client->name); return 0; - -exit_psupply: - return rc; } - static int sbs_remove(struct i2c_client *client) - { - struct sbs_info *chip = i2c_get_clientdata(client); - - cancel_delayed_work_sync(&chip->work); - - return 0; - } - #if defined CONFIG_PM_SLEEP static int sbs_suspend(struct device *dev)