[2.6 patch] add 4 missing returns to drivers/isdn/i4l/isdn_common.c

From: Adrian Bunk
Date: Mon Sep 01 2003 - 16:23:49 EST


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 },

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