firmware: vpd: Tie firmware kobject to device lifetime
authorGuenter Roeck <linux@roeck-us.net>
Wed, 15 Nov 2017 21:00:44 +0000 (13:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:52:50 +0000 (09:52 +0100)
commit03bb8e9a18190ee12f5250ff4e97ac035fb2abca
treec212fdb9a062a54629985f6ac227620fa548e8d0
parentcdc5340c054b37655ea1f8fef99d3e4ab39855d8
firmware: vpd: Tie firmware kobject to device lifetime

commit e4b28b3c3a405b251fa25db58abe1512814a680a upstream.

It doesn't make sense to have /sys/firmware/vpd if the device is not
instantiated, so tie its lifetime to the device.

Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/vpd.c