lkml.org 
[lkml]   [2020]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 06/10] sound/soc: fsl_esai: convert tasklets to use new tasklet_setup() API
    Date
    From: Allen Pais <allen.lkml@gmail.com>

    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>
    ---
    sound/soc/fsl/fsl_esai.c | 7 +++----
    1 file changed, 3 insertions(+), 4 deletions(-)

    diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
    index 4ae36099ae82..79b861afd986 100644
    --- a/sound/soc/fsl/fsl_esai.c
    +++ b/sound/soc/fsl/fsl_esai.c
    @@ -708,9 +708,9 @@ static void fsl_esai_trigger_stop(struct fsl_esai *esai_priv, bool tx)
    ESAI_xFCR_xFR, 0);
    }

    -static void fsl_esai_hw_reset(unsigned long arg)
    +static void fsl_esai_hw_reset(struct tasklet_struct *t)
    {
    - struct fsl_esai *esai_priv = (struct fsl_esai *)arg;
    + struct fsl_esai *esai_priv = from_tasklet(esai_priv, t, task);
    bool tx = true, rx = false, enabled[2];
    unsigned long lock_flags;
    u32 tfcr, rfcr;
    @@ -1070,8 +1070,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
    return ret;
    }

    - tasklet_init(&esai_priv->task, fsl_esai_hw_reset,
    - (unsigned long)esai_priv);
    + tasklet_setup(&esai_priv->task, fsl_esai_hw_reset);

    pm_runtime_enable(&pdev->dev);

    --
    2.17.1
    \
     
     \ /
      Last update: 2020-08-17 11:00    [W:6.492 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site