summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-06-09 16:34:35 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-06-09 17:28:02 -0700
commitaa62b5e49a596cad71a816fc36a4da6ad0c0cd0f (patch)
tree6316cf5e0a76346ad400566d1fd427ae0e638e7d /drivers/staging
parent9e50e987f55dc16364786525abdb4c7eac50e00b (diff)
downloadop-kernel-dev-aa62b5e49a596cad71a816fc36a4da6ad0c0cd0f.zip
op-kernel-dev-aa62b5e49a596cad71a816fc36a4da6ad0c0cd0f.tar.gz
greybus: bootrom: Compile as a separate module
User space doesn't break anymore with new greybus modules and its time to make bootrom a separate module. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/Makefile3
-rw-r--r--drivers/staging/greybus/bootrom.c11
-rw-r--r--drivers/staging/greybus/bootrom.h16
-rw-r--r--drivers/staging/greybus/core.c10
4 files changed, 4 insertions, 36 deletions
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 981569d..40325b3 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -9,7 +9,6 @@ greybus-y := core.o \
control.o \
svc.o \
svc_watchdog.o \
- bootrom.o \
operation.o \
timesync.o \
timesync_platform.o
@@ -31,6 +30,7 @@ gb-audio-gb-y := audio_gb.o
gb-audio-apbridgea-y := audio_apbridgea.o
gb-audio-manager-y += audio_manager.o
gb-audio-manager-y += audio_manager_module.o
+gb-bootrom-y := bootrom.o
gb-camera-y := camera.o
gb-firmware-y := fw-core.o fw-download.o fw-management.o
gb-spilib-y := spilib.o
@@ -62,6 +62,7 @@ endif
obj-m += gb-audio-gb.o
obj-m += gb-audio-apbridgea.o
obj-m += gb-audio-manager.o
+obj-m += gb-bootrom.o
obj-m += gb-firmware.o
obj-m += gb-spilib.o
obj-m += gb-sdio.o
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index f375a87..2cebffa 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -12,7 +12,6 @@
#include <linux/mutex.h>
#include <linux/workqueue.h>
-#include "bootrom.h"
#include "greybus.h"
/* Timeout, in jiffies, within which the next request must be received */
@@ -455,12 +454,6 @@ static struct greybus_driver gb_bootrom_driver = {
.id_table = gb_bootrom_id_table,
};
-int gb_bootrom_init(void)
-{
- return greybus_register(&gb_bootrom_driver);
-}
+module_greybus_driver(gb_bootrom_driver);
-void gb_bootrom_exit(void)
-{
- greybus_deregister(&gb_bootrom_driver);
-}
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/staging/greybus/bootrom.h b/drivers/staging/greybus/bootrom.h
deleted file mode 100644
index fd2d193..0000000
--- a/drivers/staging/greybus/bootrom.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Greybus bootrom code
- *
- * Copyright 2016 Google Inc.
- * Copyright 2016 Linaro Ltd.
- *
- * Released under the GPLv2 only.
- */
-
-#ifndef __BOOTROM_H
-#define __BOOTROM_H
-
-int gb_bootrom_init(void);
-void gb_bootrom_exit(void);
-
-#endif /* __BOOTROM_H */
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 5811299..75bc608 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -10,7 +10,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define CREATE_TRACE_POINTS
-#include "bootrom.h"
#include "greybus.h"
#include "greybus_trace.h"
@@ -271,12 +270,6 @@ static int __init gb_init(void)
goto error_operation;
}
- retval = gb_bootrom_init();
- if (retval) {
- pr_err("gb_bootrom_init failed\n");
- goto error_bootrom;
- }
-
retval = gb_timesync_init();
if (retval) {
pr_err("gb_timesync_init failed\n");
@@ -285,8 +278,6 @@ static int __init gb_init(void)
return 0; /* Success */
error_timesync:
- gb_bootrom_exit();
-error_bootrom:
gb_operation_exit();
error_operation:
gb_hd_exit();
@@ -302,7 +293,6 @@ module_init(gb_init);
static void __exit gb_exit(void)
{
gb_timesync_exit();
- gb_bootrom_exit();
gb_operation_exit();
gb_hd_exit();
bus_unregister(&greybus_bus_type);
OpenPOWER on IntegriCloud