summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylwester Nawrocki <snjw23@gmail.com>2011-11-06 16:31:41 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-08 11:28:37 -0200
commit57753767dda8a0f415555da3d94947d2687bc421 (patch)
treedb4c6dfc81f9d5a38de1c99a8e2bde34f42ece20
parent82aae98df488c15c212059b23460fe9a9dd97412 (diff)
downloadlinux-57753767dda8a0f415555da3d94947d2687bc421.tar.gz
[media] staging: as102: Make the driver select CONFIG_FW_LOADER
It doesn't seem to be of much advantage to compile in FW_LOADER support conditionally, then make the driver always select FW_LOADER and remove #idefs from the code. Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/media/as102/Kconfig1
-rw-r--r--drivers/staging/media/as102/as102_drv.c3
-rw-r--r--drivers/staging/media/as102/as102_fw.c5
3 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/media/as102/Kconfig b/drivers/staging/media/as102/Kconfig
index 5865029db0f6..28aba00dc629 100644
--- a/drivers/staging/media/as102/Kconfig
+++ b/drivers/staging/media/as102/Kconfig
@@ -1,6 +1,7 @@
config DVB_AS102
tristate "Abilis AS102 DVB receiver"
depends on DVB_CORE && USB && I2C && INPUT
+ select FW_LOADER
help
Choose Y or M here if you have a device containing an AS102
diff --git a/drivers/staging/media/as102/as102_drv.c b/drivers/staging/media/as102/as102_drv.c
index 0bcc55ca1a5b..85f58b95c315 100644
--- a/drivers/staging/media/as102/as102_drv.c
+++ b/drivers/staging/media/as102/as102_drv.c
@@ -249,7 +249,6 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
/* init start / stop stream mutex */
mutex_init(&as102_dev->sem);
-#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
/*
* try to load as102 firmware. If firmware upload failed, we'll be
* able to upload it later.
@@ -257,8 +256,6 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
if (fw_upload)
try_then_request_module(as102_fw_upload(&as102_dev->bus_adap),
"firmware_class");
-#endif
-
failed:
LEAVE();
/* FIXME: free dvb_XXX */
diff --git a/drivers/staging/media/as102/as102_fw.c b/drivers/staging/media/as102/as102_fw.c
index 3aa4aad5a464..ab7dcdb0ad66 100644
--- a/drivers/staging/media/as102/as102_fw.c
+++ b/drivers/staging/media/as102/as102_fw.c
@@ -26,7 +26,6 @@
#include "as102_drv.h"
#include "as102_fw.h"
-#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
char as102_st_fw1[] = "as102_data1_st.hex";
char as102_st_fw2[] = "as102_data2_st.hex";
char as102_dt_fw1[] = "as102_data1_dt.hex";
@@ -182,7 +181,6 @@ int as102_fw_upload(struct as102_bus_adapter_t *bus_adap)
fw2 = as102_st_fw2;
}
-#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
/* allocate buffer to store firmware upload command and data */
cmd_buf = kzalloc(MAX_FW_PKT_SIZE, GFP_KERNEL);
if (cmd_buf == NULL) {
@@ -237,8 +235,7 @@ error:
/* release firmware if needed */
if (firmware != NULL)
release_firmware(firmware);
-#endif
+
LEAVE();
return errno;
}
-#endif