WMI: embed struct device directly into wmi_block
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 26 Aug 2010 07:15:30 +0000 (00:15 -0700)
committerMatthew Garrett <mjg@redhat.com>
Thu, 21 Oct 2010 13:36:48 +0000 (09:36 -0400)
commitc64eefd48c44fa8145ad1f96edabf4a053fffc49
tree6956b6d86c7253d1cd52233c3818d3041787405b
parent614ef4322200086447d5e1f79e8876213c94f499
WMI: embed struct device directly into wmi_block

Instead of creating wmi_blocks and then register corresponding devices
on a separate pass do it all in one shot, since lifetime rules for both
objects are the same. This also takes care of leaking devices when
device_create fails for one of them.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/wmi.c