lkml.org 
[lkml]   [1998]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: pre-2.1.127-2 problem with parport_share.c
Date
From
"Manuel J. Galan" <manolow@step.es> said:
> --- drivers/misc/parport_share.c.bad Tue Oct 27 14:08:43 1998
> +++ drivers/misc/parport_share.c Tue Oct 27 14:50:28 1998
> @@ -62,6 +62,7 @@
> struct parport *tmp;
> int portnum;
> char *name;
> + rwlock_t tmp_rw_lock = RW_LOCK_UNLOCKED;
>
> /* Check for a previously registered port.
> NOTE: we will ignore irq and dma if we find a previously
> @@ -105,7 +106,7 @@
> tmp->ops = ops;
> tmp->number = portnum;
> memset (&tmp->probe_info, 0, sizeof (struct parport_device_info));
> - tmp->cad_lock = RW_LOCK_UNLOCKED;
> + memcpy (&tmp->cad_lock, &tmp_rw_lock, sizeof (tmp_rw_lock));
> spin_lock_init(&tmp->waitlist_lock);
> spin_lock_init(&tmp->pardevice_lock);

I'd much prefer a macro for setting/initializing spinlocks that you can
define as empty where not used.

Just 2 cents.
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.075 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site