mfd: Move twl-core device_init_wakeup to after platform_device_add
authorNeilBrown <neilb@suse.de>
Fri, 6 Jul 2012 22:51:03 +0000 (08:51 +1000)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 2 Mar 2013 20:11:56 +0000 (22:11 +0200)
commite275fece47d353f645f68d8d67474e95ce72b205
treef639973db8e8e641891cc455399b91d4e6b7f7c3
parentb6ea2db4fa688e64b80e5bdc36375b6477a62f9a
mfd: Move twl-core device_init_wakeup to after platform_device_add

device_init_wakeup uses the dev_name() of the device to set the
name of the wakeup_source which appears in
/sys/kernel/debug/wakeup_sources.

For a platform device, that name is not set until platform_device_add
calls dev_set_name.

So the call to device_init_wakeup() must be after the call to
platform_device_add().
Making this change causes correct names to appear in the
wakeup_sources file.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/twl-core.c