From: Aurelio <sk...@us...> - 2007-02-13 20:34:40
|
Update of /cvsroot/zyxel630-11/amedyn2/module In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6794 Modified Files: amedyn2.c Log Message: Fix build errors with kernel 2.6.20 about work_struct. Now the module build, usbatm with warning. I'm not use it. http://lkml.org/lkml/2006/12/5/269 Index: amedyn2.c =================================================================== RCS file: /cvsroot/zyxel630-11/amedyn2/module/amedyn2.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** amedyn2.c 2 Dec 2006 16:13:38 -0000 1.15 --- amedyn2.c 13 Feb 2007 20:34:30 -0000 1.16 *************** *** 106,110 **** unsigned int altsetting; ! struct work_struct status_checker; unsigned char last_status; --- 106,110 ---- unsigned int altsetting; ! struct delayed_work status_checker; unsigned char last_status; *************** *** 502,507 **** } ! static void amedyn_check_status(struct amedyn_instance_data *instance) { struct usbatm_data *usbatm = instance->usbatm; struct atm_dev *atm_dev = usbatm->atm_dev; --- 502,511 ---- } ! static void amedyn_check_status(struct work_struct *work) { + + struct amedyn_instance_data *instance = + container_of(work, struct amedyn_instance_data, + status_checker.work); struct usbatm_data *usbatm = instance->usbatm; struct atm_dev *atm_dev = usbatm->atm_dev; *************** *** 597,601 **** struct amedyn_instance_data *instance = (void *)data; ! schedule_work(&instance->status_checker); /* The following check is racy, but the race is harmless */ --- 601,605 ---- struct amedyn_instance_data *instance = (void *)data; ! schedule_delayed_work(&instance->status_checker, 0); /* The following check is racy, but the race is harmless */ *************** *** 778,782 **** usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); ! INIT_WORK(&instance->status_checker, (void *)amedyn_check_status, instance); instance->status_checker.timer.function = amedyn_status_poll; --- 782,786 ---- usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); ! INIT_DELAYED_WORK(&instance->status_checker, amedyn_check_status); instance->status_checker.timer.function = amedyn_status_poll; |