Re: pre-2.1.127-2 problem with parport_share.c
Horst von Brand (vonbrand@inf.utfsm.cl)
Tue, 27 Oct 1998 13:47:27 -0300
"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/