lkml.org 
[lkml]   [2005]   [Sep]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 15 Sep 2005 20:32:28 +0800
Fromjayakumar alsa <>
SubjectRe: [Alsa-devel] [RFC 2.6.13.1 1/1] CS5535 AUDIO ALSA driver
On 9/15/05, Takashi Iwai <tiwai@suse.de> wrote:
> Just small glitches I found below:

Much appreciated. Thanks for reviewing. :-)

> You can put this header filer into sound/pci/cs5535, so that it won't
> be exported.  Then you don't need __KERNEL__ check, too.

Will do.

> > +     u16 eot:1;
> > +} cs5535audio_dma_desc_t;
> 
> The bitfield isn't portable to use to comminucate with the hardware.
> Better to use u16 and normal bit operations.

I think 5535 is x86-32 specific, but you are right, I shouldn't use
bit fields. I'll convert over to masks.

> The loop with do_delay() should be replaced with more portable ones
> like msleep().

Will do.

> 
> > +{
> > +     unsigned long regdata=0;
> 
> Unnecessary initialization :)

Good catch.

> > +     cs5535au = kcalloc(1, sizeof(*cs5535au), GFP_KERNEL);
> 
> Let's use the new kzalloc().

Will do.

> > +     spin_lock(&cs5535au->reg_lock);
> > +     dma->ops->disable_dma(cs5535au);
> > +     dma->ops->setup_prd(cs5535au, jmpprd_addr);
> > +     spin_unlock(&cs5535au->reg_lock);
> 
> You need spin_lock_irq() here, instead.
> 

Got it. Will do.

Thanks,
jk
-
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/

\
 
 \ /
  Last update: 2005-09-15 14:35    [from the cache]
©2003-2008