media: media/radio: wl128x: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
9db2f6a480
commit
b28f1bf82d
@ -244,7 +244,7 @@ void fmc_update_region_info(struct fmdev *fmdev, u8 region_to_set)
|
|||||||
* FM common sub-module will schedule this tasklet whenever it receives
|
* FM common sub-module will schedule this tasklet whenever it receives
|
||||||
* FM packet from ST driver.
|
* FM packet from ST driver.
|
||||||
*/
|
*/
|
||||||
static void recv_tasklet(unsigned long arg)
|
static void recv_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct fmdev *fmdev;
|
struct fmdev *fmdev;
|
||||||
struct fm_irq *irq_info;
|
struct fm_irq *irq_info;
|
||||||
@ -253,7 +253,7 @@ static void recv_tasklet(unsigned long arg)
|
|||||||
u8 num_fm_hci_cmds;
|
u8 num_fm_hci_cmds;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
fmdev = (struct fmdev *)arg;
|
fmdev = from_tasklet(fmdev, t, tx_task);
|
||||||
irq_info = &fmdev->irq_info;
|
irq_info = &fmdev->irq_info;
|
||||||
/* Process all packets in the RX queue */
|
/* Process all packets in the RX queue */
|
||||||
while ((skb = skb_dequeue(&fmdev->rx_q))) {
|
while ((skb = skb_dequeue(&fmdev->rx_q))) {
|
||||||
@ -328,13 +328,13 @@ static void recv_tasklet(unsigned long arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* FM send tasklet: is scheduled when FM packet has to be sent to chip */
|
/* FM send tasklet: is scheduled when FM packet has to be sent to chip */
|
||||||
static void send_tasklet(unsigned long arg)
|
static void send_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct fmdev *fmdev;
|
struct fmdev *fmdev;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
fmdev = (struct fmdev *)arg;
|
fmdev = from_tasklet(fmdev, t, tx_task);
|
||||||
|
|
||||||
if (!atomic_read(&fmdev->tx_cnt))
|
if (!atomic_read(&fmdev->tx_cnt))
|
||||||
return;
|
return;
|
||||||
@ -1535,11 +1535,11 @@ int fmc_prepare(struct fmdev *fmdev)
|
|||||||
|
|
||||||
/* Initialize TX queue and TX tasklet */
|
/* Initialize TX queue and TX tasklet */
|
||||||
skb_queue_head_init(&fmdev->tx_q);
|
skb_queue_head_init(&fmdev->tx_q);
|
||||||
tasklet_init(&fmdev->tx_task, send_tasklet, (unsigned long)fmdev);
|
tasklet_setup(&fmdev->tx_task, send_tasklet);
|
||||||
|
|
||||||
/* Initialize RX Queue and RX tasklet */
|
/* Initialize RX Queue and RX tasklet */
|
||||||
skb_queue_head_init(&fmdev->rx_q);
|
skb_queue_head_init(&fmdev->rx_q);
|
||||||
tasklet_init(&fmdev->rx_task, recv_tasklet, (unsigned long)fmdev);
|
tasklet_setup(&fmdev->rx_task, recv_tasklet);
|
||||||
|
|
||||||
fmdev->irq_info.stage = 0;
|
fmdev->irq_info.stage = 0;
|
||||||
atomic_set(&fmdev->tx_cnt, 1);
|
atomic_set(&fmdev->tx_cnt, 1);
|
||||||
|
Reference in New Issue
Block a user