[PATCH V2 11/31] staging: ks7010: make loading config file optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

We have sane defaults, so we don't need to bail out if there is no
config file. Note that the config file should go away completely in
favour of configuration mechanisms already upstream.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/ks7010/ks7010_config.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_config.c b/drivers/staging/ks7010/ks7010_config.c
index 7f273dafaf3583..06ff8852e17f33 100644
--- a/drivers/staging/ks7010/ks7010_config.c
+++ b/drivers/staging/ks7010/ks7010_config.c
@@ -203,7 +203,6 @@ int ks_wlan_read_config_file(ks_wlan_private *priv)
 
 	const struct firmware *fw_entry;
 	struct device *dev = NULL;
-	int retval;
 	char cfg_file[]=CFG_FILE;
 	char *cur_p, *end_p;
 	char wk_buff[256], *wk_p;
@@ -254,10 +253,9 @@ int ks_wlan_read_config_file(ks_wlan_private *priv)
 	priv->reg.rate_set.size = 12;
 
 	dev = &priv->ks_wlan_hw.sdio_card->func->dev;
-	if((retval = request_firmware(&fw_entry, cfg_file, dev)) !=0 ){
-		DPRINTK(1, "error request_firmware() file=%s ret=%d\n", cfg_file, retval);
-		return 1;
-	}
+	/* If no cfg file, stay with the defaults */
+	if (request_firmware_direct(&fw_entry, cfg_file, dev))
+		return 0;
 
 	DPRINTK(4, "success request_firmware() file=%s size=%d\n", cfg_file, fw_entry->size);
 	cur_p = fw_entry->data;
-- 
2.8.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux