Messages in this thread | | | Date | Tue, 27 Oct 1998 19:42:51 -0000 (WET) | From | "Manuel J. Galan" <> | Subject | Re: pre-2.1.127-2 problem with parport_share.c |
| |
I'd too.
The problem is that it is not an initialization but an asignment. Then gcc barfs and stops on error; because you can not use = to asign a structure...(gcc-2.7.2.3)
On 27-Oct-98 Horst von Brand wrote: > "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
---------------------------------- E-Mail: Manuel J. Galan <manolow@step.es> Date: 27-Oct-98 Time: 19:40:21
This message was sent by XFMail ----------------------------------
- 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/
| |