Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936460AbZFPF4u (ORCPT ); Tue, 16 Jun 2009 01:56:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935307AbZFPFvL (ORCPT ); Tue, 16 Jun 2009 01:51:11 -0400 Received: from kroah.org ([198.145.64.141]:48354 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934672AbZFPFvH (ORCPT ); Tue, 16 Jun 2009 01:51:07 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Samuel Ortiz , Dominik Brodowski , Greg Kroah-Hartman Subject: [PATCH 20/64] firmware: pcmcia/ds: prepare for FIRMWARE_NAME_MAX removal Date: Mon, 15 Jun 2009 22:46:09 -0700 Message-Id: <1245131213-24168-20-git-send-email-gregkh@suse.de> X-Mailer: git-send-email 1.6.3.1 In-Reply-To: <20090616051351.GA23627@kroah.com> References: <20090616051351.GA23627@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1803 Lines: 52 From: Samuel Ortiz 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 Cc: Dominik Brodowski Signed-off-by: Greg Kroah-Hartman --- drivers/pcmcia/ds.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 47cab31..8f2bb01 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -828,7 +828,6 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) { 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 pcmcia_device *dev, char * filename) 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, -- 1.6.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/