All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartmann <greg@kroah.com>,
	Damien Bergamini <damien.bergamini@free.fr>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Samuel Ortiz <sameo@linux.intel.com>
Subject: [PATCH 2/6] atm/ueagle-atm: prepare for FIRMWARE_NAME_MAX removal
Date: Tue, 26 May 2009 19:40:14 +0200	[thread overview]
Message-ID: <20090526174159.517598981@linux.intel.com> (raw)
In-Reply-To: 20090526174012.423883376@linux.intel.com

[-- Attachment #1: firmware-ueagle.patch --]
[-- Type: text/plain, Size: 1988 bytes --]

From: Samuel Ortiz <sameo@linux.intel.com>
To: Damien Bergamini <damien.bergamini@free.fr>

We're going to remove the FIRMWARE_NAME_MAX definition in order to avoid any
firmware name length restriction.
This patch replaces the shared FIRMWARE_NAME_MAX definition with a ueagle
local one.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

---
 drivers/usb/atm/ueagle-atm.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Index: iwm-2.6/drivers/usb/atm/ueagle-atm.c
===================================================================
--- iwm-2.6.orig/drivers/usb/atm/ueagle-atm.c	2009-05-26 17:11:36.000000000 +0200
+++ iwm-2.6/drivers/usb/atm/ueagle-atm.c	2009-05-26 17:11:44.000000000 +0200
@@ -306,6 +306,7 @@ enum {
 #define FW_GET_BYTE(p)	*((__u8 *) (p))
 
 #define FW_DIR "ueagle-atm/"
+#define UEA_FW_NAME_MAX 30
 #define NB_MODEM 4
 
 #define BULK_TIMEOUT 300
@@ -1564,9 +1565,9 @@ static void cmvs_file_name(struct uea_so
 		file = cmv_file[sc->modem_index];
 
 	strcpy(cmv_name, FW_DIR);
-	strlcat(cmv_name, file, FIRMWARE_NAME_MAX);
+	strlcat(cmv_name, file, UEA_FW_NAME_MAX);
 	if (ver == 2)
-		strlcat(cmv_name, ".v2", FIRMWARE_NAME_MAX);
+		strlcat(cmv_name, ".v2", UEA_FW_NAME_MAX);
 }
 
 static int request_cmvs_old(struct uea_softc *sc,
@@ -1574,7 +1575,7 @@ static int request_cmvs_old(struct uea_s
 {
 	int ret, size;
 	u8 *data;
-	char cmv_name[FIRMWARE_NAME_MAX]; /* 30 bytes stack variable */
+	char cmv_name[UEA_FW_NAME_MAX]; /* 30 bytes stack variable */
 
 	cmvs_file_name(sc, cmv_name, 1);
 	ret = request_firmware(fw, cmv_name, &sc->usb_dev->dev);
@@ -1608,7 +1609,7 @@ static int request_cmvs(struct uea_softc
 	int ret, size;
 	u32 crc;
 	u8 *data;
-	char cmv_name[FIRMWARE_NAME_MAX]; /* 30 bytes stack variable */
+	char cmv_name[UEA_FW_NAME_MAX]; /* 30 bytes stack variable */
 
 	cmvs_file_name(sc, cmv_name, 2);
 	ret = request_firmware(fw, cmv_name, &sc->usb_dev->dev);

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2009-05-26 17:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 17:40 [PATCH 0/6] firmware: dynamic firmware id allocation Samuel Ortiz
2009-05-26 17:40 ` [PATCH 1/6] firmware: allocate firmware id dynamically Samuel Ortiz
2009-05-26 17:40 ` Samuel Ortiz [this message]
2009-05-26 17:40 ` [PATCH 3/6] tuners/xc2028: prepare for FIRMWARE_NAME_MAX removal Samuel Ortiz
2009-05-26 17:40 ` [PATCH 4/6] dvb/dvb-usb: " Samuel Ortiz
2009-05-26 18:32   ` Michael Krufky
2009-05-26 18:42     ` Samuel Ortiz
2009-05-26 18:44       ` Michael Krufky
2009-05-26 17:40 ` [PATCH 5/6] pcmcia/ds: " Samuel Ortiz
2009-05-26 17:40 ` [PATCH 6/6] firmware: " Samuel Ortiz
2009-05-26 19:04 ` [PATCH 0/6] firmware: dynamic firmware id allocation John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090526174159.517598981@linux.intel.com \
    --to=sameo@linux.intel.com \
    --cc=damien.bergamini@free.fr \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.