First of all ACPI HID is a part of the device name which is printed as a part of the dev_info(dev, ...); line. Second, since the only BID is left, it's a part of ACPI path, which can be printed via %pfw. Get rid of ugly and leaky ACPI handling in gmin_subdev_add() by replacing it with %pfw. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- .../media/atomisp/pci/atomisp_gmin_platform.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index d0b9d906a563..7f9e93a9a4b1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -463,20 +463,9 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev, struct gm { struct i2c_client *client = v4l2_get_subdevdata(subdev); struct device *dev = &client->dev; - struct acpi_device *adev; - acpi_handle handle; int ret; - handle = ACPI_HANDLE(dev); - - // FIXME: may need to release resources allocated by acpi_bus_get_device() - if (!handle || acpi_bus_get_device(handle, &adev)) { - dev_err(dev, "Error could not get ACPI device\n"); - return NULL; - } - - dev_info(&client->dev, "%s: ACPI detected it on bus ID=%s, HID=%s\n", - __func__, acpi_device_bid(adev), acpi_device_hid(adev)); + dev_info(&client->dev, "%s: ACPI path is %pfw\n", __func__, dev_fwnode(dev)); if (power) { gdev->pwm_i2c_addr = power->addr; -- 2.27.0