linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] add 4 missing returns to drivers/isdn/i4l/isdn_common.c
@ 2003-09-01 21:21 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2003-09-01 21:21 UTC (permalink / raw)
  To: isdn4linux; +Cc: linux-kernel, trivial

The patch below adds 4 missing returns to drivers/isdn/i4l/isdn_common.c.
I'm not 100% sure whether other return values are possible (and I don't 
have a good knowledge of the ISDN code) but at a first glance it seems 
there are no other possible return values in these functions.

I've tested the compilation with 2.6.0-test4-mm4.

cu
Adrian

--- linux-2.6.0-test4-mm4-no-smp/drivers/isdn/i4l/isdn_common.c.old	2003-09-01 23:07:10.000000000 +0200
+++ linux-2.6.0-test4-mm4-no-smp/drivers/isdn/i4l/isdn_common.c	2003-09-01 23:08:23.000000000 +0200
@@ -586,78 +586,82 @@
 
 static int
 drv_register(struct fsm_inst *fi, int pr, void *arg)
 {
 	struct isdn_driver *drv = fi->userdata;
 	isdn_if *iif = arg;
 	
 	fsm_change_state(fi, ST_DRV_LOADED);
 	drv->maxbufsize = iif->maxbufsize;
 	drv->interface = iif;
 	iif->channels = drv->di;
 	iif->rcvcallb_skb = isdn_receive_skb_callback;
 	iif->statcallb = isdn_status_callback;
 
 	isdn_info_update();
+	return 0;
 }
 
 static int
 drv_stat_run(struct fsm_inst *fi, int pr, void *arg)
 {
 	struct isdn_driver *drv = fi->userdata;
 	fsm_change_state(fi, ST_DRV_RUNNING);
 
 	drv->features = drv->interface->features;
 	isdn_v110_add_features(drv);
 	set_global_features();
+	return 0;
 }
 
 static int
 drv_stat_stop(struct fsm_inst *fi, int pr, void *arg)
 {
 	fsm_change_state(fi, ST_DRV_LOADED);
 	set_global_features();
+	return 0;
 }
 
 static int
 drv_stat_unload(struct fsm_inst *fi, int pr, void *arg)
 {
 	struct isdn_driver *drv = fi->userdata;
 	unsigned long flags;
 
 	spin_lock_irqsave(&drivers_lock, flags);
 	drivers[drv->di] = NULL;
 	spin_unlock_irqrestore(&drivers_lock, flags);
 	put_drv(drv);
 
 	dev->channels -= drv->channels;
 
 	isdn_info_update();
 	return 0;
 }
 
 static int
 drv_stat_stavail(struct fsm_inst *fi, int pr, void *arg)
 {
 	struct isdn_driver *drv = fi->userdata;
 	unsigned long flags;
 	isdn_ctrl *c = arg;
 	
 	spin_lock_irqsave(&stat_lock, flags);
 	drv->stavail += c->arg;
 	spin_unlock_irqrestore(&stat_lock, flags);
 	wake_up_interruptible(&drv->st_waitq);
+	return 0;
 }
 
 static int
 drv_to_slot(struct fsm_inst *fi, int pr, void *arg)
 {
 	struct isdn_driver *drv = fi->userdata;
 	isdn_ctrl *c = arg;
 	int ch = c->arg & 0xff;
 
 	return fsm_event(&drv->slots[ch].fi, pr, arg);
 }
 
 static struct fsm_node drv_fn_tbl[] = {
 	{ ST_DRV_NULL,    EV_DRV_REGISTER, drv_register     },
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-01 21:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-01 21:21 [2.6 patch] add 4 missing returns to drivers/isdn/i4l/isdn_common.c Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).