[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <500F0CD6.7080907@canonical.com>
Date: Tue, 24 Jul 2012 15:00:06 -0600
From: Tim Gardner <tim.gardner@...onical.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
usb-storage@...ts.one-eyed-alien.net
Subject: Re: [PATCH] ene_ub6250: Use macros for firmware names
On 07/24/2012 02:34 PM, Greg Kroah-Hartman wrote:
> On Tue, Jul 24, 2012 at 02:31:09PM -0600, Tim Gardner wrote:
>> Advertise firmware files using MODULE_FIRMWARE macros.
>>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Cc: linux-usb@...r.kernel.org
>> Cc: usb-storage@...ts.one-eyed-alien.net
>> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
>> ---
>> drivers/usb/storage/ene_ub6250.c | 26 +++++++++++++++++++-------
>> 1 file changed, 19 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
>> index b28f2ad..3fec82f 100644
>> --- a/drivers/usb/storage/ene_ub6250.c
>> +++ b/drivers/usb/storage/ene_ub6250.c
>> @@ -29,9 +29,21 @@
>> #include "protocol.h"
>> #include "debug.h"
>>
>> +#define SD_INIT1_FIRMWARE "ene-ub6250/sd_init1.bin"
>> +#define SD_INIT2_FIRMWARE "ene-ub6250/sd_init2.bin"
>> +#define SD_RW_FIRMWARE "ene-ub6250/sd_rdwr.bin"
>> +#define MS_INIT_FIRMWARE "ene-ub6250/ms_init.bin"
>> +#define MSP_RW_FIRMWARE "ene-ub6250/msp_rdwr.bin"
>> +#define MS_RW_FIRMWARE "ene-ub6250/ms_rdwr.bin"
>> +
>> MODULE_DESCRIPTION("Driver for ENE UB6250 reader");
>> MODULE_LICENSE("GPL");
>> -
>> +MODULE_FIRMWARE(SD_INIT1_FIRMWARE);
>> +MODULE_FIRMWARE(SD_INIT2_FIRMWARE);
>> +MODULE_FIRMWARE(SD_RW_FIRMWARE);
>> +MODULE_FIRMWARE(MS_INIT_FIRMWARE);
>> +MODULE_FIRMWARE(MSP_RW_FIRMWARE);
>> +MODULE_FIRMWARE(MS_RW_FIRMWARE);
>
> Why do you need the #defines here at all? What's wrong with just using
> the file names in the MODULE_FIRMWARE() macro directly? That cuts the
> size of the patch in half :)
>
> thanks,
>
> greg k-h
>
If the firmware file name ever changes, then you'll have to find and
modify it in 2 places.
I don't really have a strong preference, but I would like to see
MODULE_FIRMWARE() used so I can cut down on the number of false
positives as I go through the kernel firmware directory and the
linux-firmware package to filter out unused files using modinfo.
rtg
--
Tim Gardner tim.gardner@...onical.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists