[PATCH 5/7 v2] pcmcia/ds: prepare for FIRMWARE_NAME_MAX removal

From: Samuel Ortiz
Date: Tue May 26 2009 - 18:51:28 EST


From: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>
To: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>

We're going to remove the FIRMWARE_NAME_MAX definition in order to avoid any
firmware name length restriction.
With the FIRMWARE_NAME_MAX removal, the ds.c reference becomes useless as we
dont need to check for the firmware name length anymore.

Signed-off-by: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>

---
drivers/pcmcia/ds.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)

Index: iwm-2.6/drivers/pcmcia/ds.c
===================================================================
--- iwm-2.6.orig/drivers/pcmcia/ds.c 2009-05-26 17:32:21.000000000 +0200
+++ iwm-2.6/drivers/pcmcia/ds.c 2009-05-26 17:33:07.000000000 +0200
@@ -828,7 +828,6 @@ static int pcmcia_load_firmware(struct p
{
struct pcmcia_socket *s = dev->socket;
const struct firmware *fw;
- char path[FIRMWARE_NAME_MAX];
int ret = -ENOMEM;
int no_funcs;
int old_funcs;
@@ -839,16 +838,7 @@ static int pcmcia_load_firmware(struct p

ds_dev_dbg(1, &dev->dev, "trying to load CIS file %s\n", filename);

- if (strlen(filename) > (FIRMWARE_NAME_MAX - 1)) {
- dev_printk(KERN_WARNING, &dev->dev,
- "pcmcia: CIS filename is too long [%s]\n",
- filename);
- return -EINVAL;
- }
-
- snprintf(path, sizeof(path), "%s", filename);
-
- if (request_firmware(&fw, path, &dev->dev) == 0) {
+ if (request_firmware(&fw, filename, &dev->dev) == 0) {
if (fw->size >= CISTPL_MAX_CIS_SIZE) {
ret = -EINVAL;
dev_printk(KERN_ERR, &dev->dev,

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/