From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v2 05/22] ACPI: add acpi_dev_get_device() Date: Wed, 29 Jul 2015 22:08:10 -0500 Message-ID: References: <1438089593-7696-1-git-send-email-tomeu.vizoso@collabora.com> <1438089593-7696-6-git-send-email-tomeu.vizoso@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1438089593-7696-6-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tomeu Vizoso Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , Javier Martinez Canillas , Mark Brown , Thierry Reding , "Rafael J. Wysocki" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Dmitry Torokhov , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linus Walleij , "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Arnd Bergmann , Len Brown List-Id: devicetree@vger.kernel.org On Tue, Jul 28, 2015 at 8:19 AM, Tomeu Vizoso wrote: > This function is just a getter for struct acpi_device.dev and is needed > in the implementation of the fwnode API when building with !CONFIG_ACPI. > > Signed-off-by: Tomeu Vizoso > --- > > Changes in v2: > - Add acpi_dev_get_device() > > include/linux/acpi.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index 01e6770d8e27..d1ad6c20c7e4 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -78,6 +78,11 @@ static inline void acpi_preset_companion(struct device *dev, > ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL)); > } > > +static inline struct device *acpi_dev_get_device(struct acpi_device *adev) get usually implies reference counting. Perhaps acpi_dev_to_device or acpi_dev_find_device. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html