Commit ed62acec authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Greg Kroah-Hartman

firmware: pcmcia/ds: prepare for FIRMWARE_NAME_MAX removal

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: default avatarSamuel Ortiz <sameo@linux.intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 56aec8d8
...@@ -828,7 +828,6 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) ...@@ -828,7 +828,6 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
{ {
struct pcmcia_socket *s = dev->socket; struct pcmcia_socket *s = dev->socket;
const struct firmware *fw; const struct firmware *fw;
char path[FIRMWARE_NAME_MAX];
int ret = -ENOMEM; int ret = -ENOMEM;
int no_funcs; int no_funcs;
int old_funcs; int old_funcs;
...@@ -839,16 +838,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) ...@@ -839,16 +838,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
ds_dev_dbg(1, &dev->dev, "trying to load CIS file %s\n", filename); ds_dev_dbg(1, &dev->dev, "trying to load CIS file %s\n", filename);
if (strlen(filename) > (FIRMWARE_NAME_MAX - 1)) { if (request_firmware(&fw, filename, &dev->dev) == 0) {
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 (fw->size >= CISTPL_MAX_CIS_SIZE) { if (fw->size >= CISTPL_MAX_CIS_SIZE) {
ret = -EINVAL; ret = -EINVAL;
dev_printk(KERN_ERR, &dev->dev, dev_printk(KERN_ERR, &dev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment