lkml.org 
[lkml]   [2008]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + pcmcia-add-support-the-cf-pcmcia-driver-for-blackfin-try-2.patch added to -mm tree
On Tue, May 20, 2008 at 3:51 AM, Bryan Wu <cooloney@kernel.org> wrote:
> On Tue, May 20, 2008 at 2:08 PM, <akpm@linux-foundation.org> wrote:
>> +config BFIN_CFPCMCIA
>> + tristate "Blackfin CompactFlash PCMCIA Driver"
>> + depends on PCMCIA && BLACKFIN
>> + help
>> + Say Y here to support the CompactFlash PCMCIA driver for Blackfin.

please add a common statement that tells you the module name if the
user builds it as a module.

>> + * author: Michael Hennerich (hennerich@blackfin.uclinux.org)

shouldnt this be MODULE_AUTHOR() ?

>> + u_int irq;
>> + u_short cd_pfx;

u_int forms are weird ... i'd wonder why we have these variations
anywhere in the kernel

>> +static int __init bfin_cf_probe(struct platform_device *pdev)

should be __devinit

>> + cd_pfx = platform_get_irq(pdev, 1); /*Card Detect GPIO PIN */
>> + if (cd_pfx > MAX_BLACKFIN_GPIOS)
>> + return -EINVAL;
>> +
>> + if (gpio_request(cd_pfx, "pcmcia: CD")) {

i dont think that MAX_BLACKFIN_GPIOS check is needed. the
gpio_request() function should already be doing it.

>> + printk(KERN_ERR
>> + "BF5xx flash: Failed ro request Card Detect GPIO_%d\n",

"BF5xx flash" ?

>> + cf = kzalloc(sizeof *cf, GFP_KERNEL);
>> + if (!cf)
>> + return -ENOMEM;

we dont call gpio_free() here or in the fail0 case below.
-mike


\
 
 \ /
  Last update: 2008-05-22 01:37    [W:0.072 / U:1.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site