summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/lenovo/yogabook.c4
-rw-r--r--drivers/platform/x86/serdev_helpers.h3
-rw-r--r--drivers/platform/x86/x86-android-tablets/core.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/platform/x86/lenovo/yogabook.c b/drivers/platform/x86/lenovo/yogabook.c
index 1a4b2ab1f35d..8a91d440724b 100644
--- a/drivers/platform/x86/lenovo/yogabook.c
+++ b/drivers/platform/x86/lenovo/yogabook.c
@@ -353,13 +353,13 @@ static int yogabook_wmi_probe(struct wmi_device *wdev, const void *context)
goto error_put_devs;
}
- data->kbd_dev = get_device(acpi_get_first_physical_node(data->kbd_adev));
+ data->kbd_dev = acpi_bus_get_primary_device(data->kbd_adev);
if (!data->kbd_dev || !data->kbd_dev->driver) {
r = -EPROBE_DEFER;
goto error_put_devs;
}
- data->dig_dev = get_device(acpi_get_first_physical_node(data->dig_adev));
+ data->dig_dev = acpi_bus_get_primary_device(data->dig_adev);
if (!data->dig_dev || !data->dig_dev->driver) {
r = -EPROBE_DEFER;
goto error_put_devs;
diff --git a/drivers/platform/x86/serdev_helpers.h b/drivers/platform/x86/serdev_helpers.h
index 57eac75805e2..20267e1941f1 100644
--- a/drivers/platform/x86/serdev_helpers.h
+++ b/drivers/platform/x86/serdev_helpers.h
@@ -74,8 +74,7 @@ get_serdev_controller(const char *serial_ctrl_hid,
return ERR_PTR(-ENODEV);
}
- /* get_first_physical_node() returns a weak ref */
- parent = get_device(acpi_get_first_physical_node(adev));
+ parent = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!parent) {
pr_err("error could not get %s/%s serial-ctrl physical node\n",
diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index cfff7f5eac5d..2c262f117235 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -390,7 +390,6 @@ static int gpio_secondary_fwnode_init(struct device *parent,
{
const struct software_node *const *swnode;
struct fwnode_handle *fwnode;
- struct device *phys_dev;
int ret;
if (!node_group)
@@ -418,7 +417,8 @@ static int gpio_secondary_fwnode_init(struct device *parent,
if (WARN_ON(!fwnode))
return -ENOENT;
- phys_dev = acpi_get_first_physical_node(to_acpi_device(dev));
+ struct device *phys_dev __free(put_device) =
+ acpi_bus_get_primary_device(to_acpi_device(dev));
if (!phys_dev)
return dev_err_probe(parent, -ENODEV,
"No physical device for ACPI GPIO dev: %pfwP\n",