OSDN Git Service

firmware: coreboot: Make bus registration symmetric
authorStephen Boyd <swboyd@chromium.org>
Wed, 15 Aug 2018 20:37:05 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2018 13:37:23 +0000 (15:37 +0200)
commitb81e3140e4128921f25119a2b5ae0049f8373d1a
tree1ae83415715c34e726b3c9200f493666ef78de6d
parent20edec388277b62ddfddb8b2b376a937a2cd6d1b
firmware: coreboot: Make bus registration symmetric

The bus is registered in module_init() but is unregistered when the
platform driver remove() function calls coreboot_table_exit(). That
isn't symmetric and it causes the bus to appear on systems that compile
this code in, even when there isn't any coreboot firmware on the device.
Let's move the registration to the coreboot_table_init() function so
that it matches the exit path.

Cc: Wei-Ning Huang <wnhuang@chromium.org>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Brian Norris <briannorris@chromium.org>
Cc: Samuel Holland <samuel@sholland.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/coreboot_table.c