diff options
author | Sjur Braendeland <sjur.brandeland@stericsson.com> | 2010-06-17 06:55:38 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-21 02:46:05 (GMT) |
commit | b1c74247b9e29ae3bfdf133862328c309bc9cf14 (patch) | |
tree | a20cd55d47036a22e3857d382ed505436a366efe /net/caif/cfrfml.c | |
parent | c14c643b3d91cc741425c058968672228c310927 (diff) | |
download | linux-b1c74247b9e29ae3bfdf133862328c309bc9cf14.tar.xz |
caif: Bugfix not all services uses flow-ctrl.
Flow control is not used by all CAIF services.
The usage of flow control is now part of the gerneal
initialization function for CAIF Services.
Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/cfrfml.c')
-rw-r--r-- | net/caif/cfrfml.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index fd27b17..689cbfd 100644 --- a/net/caif/cfrfml.c +++ b/net/caif/cfrfml.c @@ -23,30 +23,26 @@ static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt); static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt); -static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl); struct cflayer *cfrfml_create(u8 channel_id, struct dev_info *dev_info) { struct cfsrvl *rfm = kmalloc(sizeof(struct cfsrvl), GFP_ATOMIC); + if (!rfm) { pr_warning("CAIF: %s(): Out of memory\n", __func__); return NULL; } + caif_assert(offsetof(struct cfsrvl, layer) == 0); + memset(rfm, 0, sizeof(struct cfsrvl)); - cfsrvl_init(rfm, channel_id, dev_info); - rfm->layer.modemcmd = cfservl_modemcmd; + cfsrvl_init(rfm, channel_id, dev_info, false); rfm->layer.receive = cfrfml_receive; rfm->layer.transmit = cfrfml_transmit; snprintf(rfm->layer.name, CAIF_LAYER_NAME_SZ, "rfm%d", channel_id); return &rfm->layer; } -static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl) -{ - return -EPROTO; -} - static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt) { u8 tmp; |