[PATCH V2 26/31] staging: ks7010: remove supported card table with one element

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

 



From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

There is only this card supported, no need to iterate over the table.
The resulting firmware filename wasn't used anyway, but came from the
config file or hardcoded default.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.c | 31 ++-----------------------------
 drivers/staging/ks7010/ks7010_sdio.h |  2 --
 2 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index ed4d579300ad96..8e8476b52cedbc 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -35,19 +35,6 @@ static const struct sdio_device_id if_sdio_ids[] = {
 	{ /* all zero */ }
 };
 
-struct ks_sdio_model {
-	int model;
-	const char *firmware;
-};
-
-static struct ks_sdio_model ks_sdio_models[] = {
-	{
-		/* ks7010 */
-		.model = 0x10,
-		.firmware = "ks7010sd.rom",
-	},
-};
-
 static int ks7910_sdio_probe(struct sdio_func *function,
 			     const struct sdio_device_id *device);
 static void ks7910_sdio_remove(struct sdio_func *function);
@@ -996,7 +983,7 @@ static int ks7910_sdio_probe(struct sdio_func *func,
 	struct ks_sdio_card *card;
 	struct net_device *netdev;
 	unsigned char rw_data;
-	int i = 0, ret;
+	int ret;
 
 	DPRINTK(5, "ks7910_sdio_probe()\n");
 
@@ -1009,22 +996,8 @@ static int ks7910_sdio_probe(struct sdio_func *func,
 		return -ENOMEM;
 
 	card->func = func;
-	card->model = 0x10;
 	spin_lock_init(&card->lock);
 
-	/* select model */
-	for (i = 0; i < ARRAY_SIZE(ks_sdio_models); i++) {
-		if (card->model == ks_sdio_models[i].model)
-			break;
-	}
-
-	if (i == ARRAY_SIZE(ks_sdio_models)) {
-		DPRINTK(5, "unkown card model 0x%x\n", card->model);
-		goto error;
-	}
-
-	card->firmware = ks_sdio_models[i].firmware;
-
 	/*** Initialize  SDIO ***/
 	sdio_claim_host(func);
 
@@ -1172,7 +1145,7 @@ static int ks7910_sdio_probe(struct sdio_func *func,
 	sdio_release_host(func);
 	sdio_set_drvdata(func, NULL);
 	kfree(card);
- error:
+
 	return -ENODEV;
 }
 
diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index aea3727caf483b..2d7be5dae157c7 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -109,8 +109,6 @@ struct ks_sdio_packet {
 struct ks_sdio_card {
 	struct sdio_func *func;
 	struct ks_wlan_private *priv;
-	int model;
-	const char *firmware;
 	spinlock_t lock;
 };
 
-- 
2.8.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux