~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/media/radio/wl128x/fmdrv_common.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
        /* Process all packets in the RX queue */
272
272
        while ((skb = skb_dequeue(&fmdev->rx_q))) {
273
273
                if (skb->len < sizeof(struct fm_event_msg_hdr)) {
274
 
                        fmerr("skb(%p) has only %d bytes"
275
 
                                "atleast need %d bytes to decode\n", skb,
 
274
                        fmerr("skb(%p) has only %d bytes, "
 
275
                                "at least need %zu bytes to decode\n", skb,
276
276
                                skb->len, sizeof(struct fm_event_msg_hdr));
277
277
                        kfree_skb(skb);
278
278
                        continue;
352
352
        if (!atomic_read(&fmdev->tx_cnt))
353
353
                return;
354
354
 
355
 
        /* Check, is there any timeout happenned to last transmitted packet */
 
355
        /* Check, is there any timeout happened to last transmitted packet */
356
356
        if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) {
357
 
                fmdbg("TX timeout occurred\n");
 
357
                fmerr("TX timeout occurred\n");
358
358
                atomic_set(&fmdev->tx_cnt, 1);
359
359
        }
360
360
 
478
478
                return -ETIMEDOUT;
479
479
        }
480
480
        if (!fmdev->resp_skb) {
481
 
                fmerr("Reponse SKB is missing\n");
 
481
                fmerr("Response SKB is missing\n");
482
482
                return -EFAULT;
483
483
        }
484
484
        spin_lock_irqsave(&fmdev->resp_skb_lock, flags);
1494
1494
        }
1495
1495
 
1496
1496
        memset(&fm_st_proto, 0, sizeof(fm_st_proto));
1497
 
        fm_st_proto.type = ST_FM;
1498
1497
        fm_st_proto.recv = fm_st_receive;
1499
1498
        fm_st_proto.match_packet = NULL;
1500
1499
        fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb;
1599
1598
                fmdbg("FM Core is already down\n");
1600
1599
                return 0;
1601
1600
        }
1602
 
        /* Sevice pending read */
 
1601
        /* Service pending read */
1603
1602
        wake_up_interruptible(&fmdev->rx.rds.read_queue);
1604
1603
 
1605
1604
        tasklet_kill(&fmdev->tx_task);