From patchwork Mon Aug 17 08:31:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D52F4C433E1 for ; Mon, 17 Aug 2020 08:32:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFF512072D for ; Mon, 17 Aug 2020 08:32:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WgoiJu09" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727997AbgHQIcT (ORCPT ); Mon, 17 Aug 2020 04:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727945AbgHQIcO (ORCPT ); Mon, 17 Aug 2020 04:32:14 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40EE6C061388; Mon, 17 Aug 2020 01:32:14 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id kr4so7465150pjb.2; Mon, 17 Aug 2020 01:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=e3Og+eF42LgjnZGVUesfee3WTkmoUc4PC8c793SBuQU=; b=WgoiJu09z4J0Jj3XuHjmXRKp6QZJHcgPl1ICWv0c8Gp/4sOCo43HwNBDraeBOrRz2Z YZwz1TSpV78cMxbqMYqBgGkaxc+xCJwqzNNzgSRzuQe4MOeJlkA8ES3UprnEDKpR0prs 0kv1Y1kVCbmRB/L/cl64K1DpPrwzoSFnMUoTJGdktwTOuerqCzMAwEwUNcbm7hK1dbIj FNAYzYkQhshhFr1wSbDUQEj/BucIGRR/EyOJX5cz7RpRVRpp+Na7Kwevn3g2BucCTz0D wD1ixTL2MZmBs1BUCoEk0ZIw4QdiL5ZUSybxd7RujKFpkU4vQJp4oj8pR0jfNbmtrJ6u lI+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=e3Og+eF42LgjnZGVUesfee3WTkmoUc4PC8c793SBuQU=; b=VRAg+agrxU8+q2xg6ur5mVk3HXMqZ4JzIiz+FuFDBM36UIp4eyKFhiRX+mp6rFWwbF xSJsgrksz2JDX3n3WJ6i9pcPcb002GxpmOTLhFXRDa94pE4J1J9bDpzKLKDB7lE+c563 yENqWZJ0E4xugSwwFeXYbb/WHD7ZdZoYM4mJ9mBNNjbEMf6Y6rvtbkboNlgnNUJ1VTaa WLFQnWq5HrTM+h13r33flCvdQggkriH2odZDVpqGg4VLiGiJ+7uMR3wB+pt8rBuEZvpf i1o2dPJk54c7o9rKcDRiRmzp2h9T2EmVho+jjguXGweUsqDS919K17TIVyBho2Dq0gB7 0grw== X-Gm-Message-State: AOAM532qRG/XgsTYB2xNovv/H/64VUIyuafGVjFgc0V1WvvIEwDGks7w QGW9FC6ryrf8Ek2wxzQjPkE= X-Google-Smtp-Source: ABdhPJzUadOmIrNJaQ4WF7QKMawSbip+D07RLS2LQ9WloQtegJR1zfyW+4hAn2v9YtO/677c6Vz85w== X-Received: by 2002:a17:902:8f82:: with SMTP id z2mr8443888plo.177.1597653133845; Mon, 17 Aug 2020 01:32:13 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b15sm18448351pft.116.2020.08.17.01.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:32:13 -0700 (PDT) From: Allen Pais To: mchehab@kernel.org, maintainers@bluecherrydvr.com, patrice.chotard@st.com Cc: keescook@chromium.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 02/11] media: mantis: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:01:44 +0530 Message-Id: <20200817083153.22218-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.com> References: <20200817083153.22218-1-allen.lkml@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/media/pci/mantis/mantis_dma.c | 4 ++-- drivers/media/pci/mantis/mantis_dma.h | 2 +- drivers/media/pci/mantis/mantis_dvb.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/mantis/mantis_dma.c b/drivers/media/pci/mantis/mantis_dma.c index affc5977387f..4df571ff272b 100644 --- a/drivers/media/pci/mantis/mantis_dma.c +++ b/drivers/media/pci/mantis/mantis_dma.c @@ -200,9 +200,9 @@ void mantis_dma_stop(struct mantis_pci *mantis) } -void mantis_dma_xfer(unsigned long data) +void mantis_dma_xfer(struct tasklet_struct *t) { - struct mantis_pci *mantis = (struct mantis_pci *) data; + struct mantis_pci *mantis = from_tasklet(mantis, t, tasklet); struct mantis_hwconfig *config = mantis->hwconfig; while (mantis->last_block != mantis->busy_block) { diff --git a/drivers/media/pci/mantis/mantis_dma.h b/drivers/media/pci/mantis/mantis_dma.h index 421663443d62..37da982c9c29 100644 --- a/drivers/media/pci/mantis/mantis_dma.h +++ b/drivers/media/pci/mantis/mantis_dma.h @@ -13,6 +13,6 @@ extern int mantis_dma_init(struct mantis_pci *mantis); extern int mantis_dma_exit(struct mantis_pci *mantis); extern void mantis_dma_start(struct mantis_pci *mantis); extern void mantis_dma_stop(struct mantis_pci *mantis); -extern void mantis_dma_xfer(unsigned long data); +extern void mantis_dma_xfer(struct tasklet_struct *t); #endif /* __MANTIS_DMA_H */ diff --git a/drivers/media/pci/mantis/mantis_dvb.c b/drivers/media/pci/mantis/mantis_dvb.c index 2da94be5b373..c7ba4a76e608 100644 --- a/drivers/media/pci/mantis/mantis_dvb.c +++ b/drivers/media/pci/mantis/mantis_dvb.c @@ -205,7 +205,7 @@ int mantis_dvb_init(struct mantis_pci *mantis) } dvb_net_init(&mantis->dvb_adapter, &mantis->dvbnet, &mantis->demux.dmx); - tasklet_init(&mantis->tasklet, mantis_dma_xfer, (unsigned long) mantis); + tasklet_setup(&mantis->tasklet, mantis_dma_xfer); tasklet_disable(&mantis->tasklet); if (mantis->hwconfig) { result = config->frontend_init(mantis, mantis->fe); From patchwork Mon Aug 17 08:31:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A30A0C433DF for ; Mon, 17 Aug 2020 08:32:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 802E2207DF for ; Mon, 17 Aug 2020 08:32:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l7ws862q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728082AbgHQIcb (ORCPT ); Mon, 17 Aug 2020 04:32:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728077AbgHQIcY (ORCPT ); Mon, 17 Aug 2020 04:32:24 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0CFC061388; Mon, 17 Aug 2020 01:32:24 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id o13so7791383pgf.0; Mon, 17 Aug 2020 01:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=07OcTn0WvfbdnvA4s7Eut/eKjTVLyM4q+0Qmy2LDm0U=; b=l7ws862qdf+QG/FRgRzM2zyRMT8buz3qjIIUIC911q8cLJC5Fr7zqyZ9VZdli+Y4CO mg02zvbTldmq+25rE+w6TL3nVPvfkF9Dsc6rBcmJ2PjPHZAvCYHfWytpyM/n4mrGCoY8 GYvfL+4pmdgrQD2EkIsKqmPzkDtq/mLjng08sY2/morHJ0/b2LgTwmp5BxkF9z4HvWfM Th3BZh/j01nqCWwKf/JvN0oEq5Mr5vfIKwiUsD+/WU46dmw1Q7UBfWnu1NCAlUCZw0uN 2JlQuG0h61ifPd4Wu1hHBKNUFSFQ9R+VIfWQz9U4TQIonljShIoAbbKnXjtNPL4an9aH D8BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=07OcTn0WvfbdnvA4s7Eut/eKjTVLyM4q+0Qmy2LDm0U=; b=ZcziOOUFP3inyjTYm2ljwcroAukqWolALrAt51dwS3S6lb74TzoamcM/a2z7YUN7bv 1FqWSZf7tCASxk/6qX2H4mbtp+33K3np/FYnQx31fwNYaQLcWuaFCEu/vXeIdTHTkzKF Vu4I7bftTkt2xwU5K4iyOjbMbSWjzU1b3dD5lFGI9X2WQk7/uKZppDt/df0ZAzSybIt3 hvnRFud1ChCuhKV45C5569mnlbkktOxKS+lU+cSgjPIGZTt4UafqxbYg8h50qlZivwr0 sQR1XiKsouGVf241EqJQWYgloGtV3J1VQ8kLFUVJeChaHw9wP2f0ZSigwbEYDkBE/tul s09w== X-Gm-Message-State: AOAM530HdCMFPk9QPFyKaIvFTNUxBd6JTjcY5LApNi0x/5UkMAnDtiQ8 AsQ99+gll6rpntuAt5sc+ZQ= X-Google-Smtp-Source: ABdhPJwwstyk15Z19/5BM2jWQthYwAlrQCLHl80YU15rdh8SHJRf4gdYA8ej4Z8R4dt9WWOsmps+Og== X-Received: by 2002:a62:1614:: with SMTP id 20mr10690453pfw.258.1597653144118; Mon, 17 Aug 2020 01:32:24 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b15sm18448351pft.116.2020.08.17.01.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:32:23 -0700 (PDT) From: Allen Pais To: mchehab@kernel.org, maintainers@bluecherrydvr.com, patrice.chotard@st.com Cc: keescook@chromium.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 04/11] media: smipcie: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:01:46 +0530 Message-Id: <20200817083153.22218-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.com> References: <20200817083153.22218-1-allen.lkml@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/media/pci/smipcie/smipcie-main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c index 9ca0fc3e6f80..e7604b7ecc8d 100644 --- a/drivers/media/pci/smipcie/smipcie-main.c +++ b/drivers/media/pci/smipcie/smipcie-main.c @@ -280,9 +280,9 @@ static void smi_port_clearInterrupt(struct smi_port *port) } /* tasklet handler: DMA data to dmx.*/ -static void smi_dma_xfer(unsigned long data) +static void smi_dma_xfer(struct tasklet_struct *t) { - struct smi_port *port = (struct smi_port *) data; + struct smi_port *port = from_tasklet(port, t, tasklet); struct smi_dev *dev = port->dev; u32 intr_status, finishedData, dmaManagement; u8 dmaChan0State, dmaChan1State; @@ -422,7 +422,7 @@ static int smi_port_init(struct smi_port *port, int dmaChanUsed) } smi_port_disableInterrupt(port); - tasklet_init(&port->tasklet, smi_dma_xfer, (unsigned long)port); + tasklet_setup(&port->tasklet, smi_dma_xfer); tasklet_disable(&port->tasklet); port->enable = 1; return 0; From patchwork Mon Aug 17 08:31:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0462C433E1 for ; Mon, 17 Aug 2020 08:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F0CE20758 for ; Mon, 17 Aug 2020 08:32:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WRLKS+MM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728239AbgHQIcp (ORCPT ); Mon, 17 Aug 2020 04:32:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728143AbgHQIcd (ORCPT ); Mon, 17 Aug 2020 04:32:33 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE91C061389; Mon, 17 Aug 2020 01:32:32 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id y10so5582290plr.11; Mon, 17 Aug 2020 01:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ahy70Yk2bRVB7QBIejUmD1G9Y2W/MzcgwHjWYQelH0I=; b=WRLKS+MMnDOkRIFbCcdWRCCHhHc4NwPn/uvQL8gU6YF85p2FTJdK8xTGsE7T6dsj3U M5m5R7c22PVaRHYYlJrTCNAVVSA9Ry9vsR9LR/18XxF4S3771cEBSmJRDHFCFuI4jQ9m RwzaQWZb16vkJmf6I6rRBVfBehuKZp4pKepBsJttncXoKZr21hfqlHPKLANXMoFkBnC4 diwKPpcz6XxHWurdG2aD+q4V1SIH0iV7TZFvaqP8SlRphmAZiVHGyF0ykisJe5lBCaG5 b+BjELiv1yH0kF6J38RYp5CXxrp/u/PDEfKbkqURS8m2aBrU6fFcwy3yc+7eW5icEApv nC2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ahy70Yk2bRVB7QBIejUmD1G9Y2W/MzcgwHjWYQelH0I=; b=LCDQuMyDEHjwcj+Zjudk69KKqSd/9HgEY0tDlZOaN3+iOJdtNldptPVcEzlanKWAam hJ+f5XZeg4O+4PJCPySQdA0TxDNVC2TkUEIn+HNAgGDCxnrHAqJ4LBhnXXTF06QfRbtM +Lg3A4sX3zCWdhebiWZhFoe9o5HTDx9lrnx4aQztN80NpFXJMNl56SqcJrIq7FHmIlK4 ZkP/urR81CYyewOhs+PZHAVd/vfinrvv2TVA4495yoPs8oR4VFIuOJts2ZuRyNR3Nj1+ dSroE3K5KNEkvscUNXjj1hpLfiIBaYEU8Y1KWwCqipfXCLLaOb4S195Us+uxBwSzXjNL bI6g== X-Gm-Message-State: AOAM531yMs1fGuYbcfSqGWBplOIC/aB7fgagRWzfW212ML75d/L/VC2C MkyH/PtHTi3TAQG++tWpcJI= X-Google-Smtp-Source: ABdhPJwF+cEnYujAMr0ykZx6WmkvBbF37TVTpNJT6zlrJJGif2tX3AG7dRZY1glR0Xvx5drCCwEEsw== X-Received: by 2002:a17:90a:88:: with SMTP id a8mr11612469pja.196.1597653152014; Mon, 17 Aug 2020 01:32:32 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b15sm18448351pft.116.2020.08.17.01.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:32:31 -0700 (PDT) From: Allen Pais To: mchehab@kernel.org, maintainers@bluecherrydvr.com, patrice.chotard@st.com Cc: keescook@chromium.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 06/11] media: tw5864: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:01:48 +0530 Message-Id: <20200817083153.22218-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.com> References: <20200817083153.22218-1-allen.lkml@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/media/pci/tw5864/tw5864-video.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c index ec1e06da7e4f..e232c6535a0a 100644 --- a/drivers/media/pci/tw5864/tw5864-video.c +++ b/drivers/media/pci/tw5864/tw5864-video.c @@ -175,7 +175,7 @@ static const unsigned int intra4x4_lambda3[] = { static v4l2_std_id tw5864_get_v4l2_std(enum tw5864_vid_std std); static enum tw5864_vid_std tw5864_from_v4l2_std(v4l2_std_id v4l2_std); -static void tw5864_handle_frame_task(unsigned long data); +static void tw5864_handle_frame_task(struct tasklet_struct *t); static void tw5864_handle_frame(struct tw5864_h264_frame *frame); static void tw5864_frame_interval_set(struct tw5864_input *input); @@ -1057,8 +1057,7 @@ int tw5864_video_init(struct tw5864_dev *dev, int *video_nr) dev->irqmask |= TW5864_INTR_VLC_DONE | TW5864_INTR_TIMER; tw5864_irqmask_apply(dev); - tasklet_init(&dev->tasklet, tw5864_handle_frame_task, - (unsigned long)dev); + tasklet_setup(&dev->tasklet, tw5864_handle_frame_task); for (i = 0; i < TW5864_INPUTS; i++) { dev->inputs[i].root = dev; @@ -1313,9 +1312,9 @@ static int tw5864_is_motion_triggered(struct tw5864_h264_frame *frame) return detected; } -static void tw5864_handle_frame_task(unsigned long data) +static void tw5864_handle_frame_task(struct tasklet_struct *t) { - struct tw5864_dev *dev = (struct tw5864_dev *)data; + struct tw5864_dev *dev = from_tasklet(dev, t, tasklet); unsigned long flags; int batch_size = H264_BUF_CNT; From patchwork Mon Aug 17 08:31:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 640D8C433E1 for ; Mon, 17 Aug 2020 08:33:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E5312072D for ; Mon, 17 Aug 2020 08:33:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M3HikLYs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbgHQIdG (ORCPT ); Mon, 17 Aug 2020 04:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbgHQIco (ORCPT ); Mon, 17 Aug 2020 04:32:44 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4093C061388; Mon, 17 Aug 2020 01:32:43 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id k13so7128982plk.13; Mon, 17 Aug 2020 01:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r6iEsvCYaHsibJa9rpmWya82cHXN/+L9JRpqk2jnfA8=; b=M3HikLYsY5jZ820rwnMInNQ4KMjMxkVS2VwmimZ5k9tBdXq1PGYd5213wHMPknYxdL jh2+DZbePnzWScl6nzFOb77CmhXiSMKWfMKASdvqtVYkqfRyQwPqz5/1o5inqZBZ8dFc 1elGGFVMwBbZ+8dsftxe/r1fXNkemRcbN6USdSMxf0STVF69yJBqt71UxYiSeT5Wgr6o kjH1YMd2hhG2coQOO8qjnjmPdgbT206dxO7lUDkX1RFCcoJsxsRX4//p4E6WYHDnLNbM ZBCUSThiou01I/6hXoXUvvvRh9nfslyyQvd6OqNn2qXBW3N5mTcsAHlRzVPp4+MgJzwP TOsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r6iEsvCYaHsibJa9rpmWya82cHXN/+L9JRpqk2jnfA8=; b=NJb1xEScxmihdPBBO2r1SaNgbaBAPYHocRMpZq2Aj+rTXymXXncoWV5c00qkStEVui KTIeRWpoz34AydAgrvN5ykupziI89G66chbGCSSSU5tWr9wiEiRK6mZzOPVkveZYJ92+ E+68ghEJcfJk+JFDqU0/PK0V2yt7E7RnuaFHQrQJwHZ2MXIVu3LE6X7jY3yCBptHAwZm szZubxOlW5/enOsvx5682eOlUwg93mJ08cfoyJ1ut9B9goPGd3ucyy9xhEcOJLDTM5xo 1OdN/9WKO84IvN4z/g53JwjlbIzJqmnYKmsP3UxQHGvYuvsrgWwm4X0NVz5p9hSP6r51 etvQ== X-Gm-Message-State: AOAM5324L3zBz3GmOBNXq89koywDLo6dwPf0/CHHKb4U4i2pdcrktf5v AgYFAEaqhmE8yU8trEdJ41B7ujJi76d/Mw== X-Google-Smtp-Source: ABdhPJz72RyY25jDKMUxgEvYPHXwNJTcXnrhDfbusclY4Wta6QY/XQq8hlumZ+cC/qRzKrUqTIONBA== X-Received: by 2002:a17:90a:e511:: with SMTP id t17mr11596987pjy.189.1597653163410; Mon, 17 Aug 2020 01:32:43 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b15sm18448351pft.116.2020.08.17.01.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:32:42 -0700 (PDT) From: Allen Pais To: mchehab@kernel.org, maintainers@bluecherrydvr.com, patrice.chotard@st.com Cc: keescook@chromium.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 09/11] media: sti: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:01:51 +0530 Message-Id: <20200817083153.22218-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.com> References: <20200817083153.22218-1-allen.lkml@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 5baada4f65e5..dbe7788083a4 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -77,9 +77,9 @@ static void c8sectpfe_timer_interrupt(struct timer_list *t) add_timer(&fei->timer); } -static void channel_swdemux_tsklet(unsigned long data) +static void channel_swdemux_tsklet(struct tasklet_struct *t) { - struct channel_info *channel = (struct channel_info *)data; + struct channel_info *channel = from_tasklet(channel, t, tsklet); struct c8sectpfei *fei; unsigned long wp, rp; int pos, num_packets, n, size; @@ -208,8 +208,7 @@ static int c8sectpfe_start_feed(struct dvb_demux_feed *dvbdmxfeed) dev_dbg(fei->dev, "Starting channel=%p\n", channel); - tasklet_init(&channel->tsklet, channel_swdemux_tsklet, - (unsigned long) channel); + tasklet_setup(&channel->tsklet, channel_swdemux_tsklet); /* Reset the internal inputblock sram pointers */ writel(channel->fifo, @@ -638,8 +637,7 @@ static int configure_memdma_and_inputblock(struct c8sectpfei *fei, writel(tsin->back_buffer_busaddr, tsin->irec + DMA_PRDS_BUSRP_TP(0)); /* initialize tasklet */ - tasklet_init(&tsin->tsklet, channel_swdemux_tsklet, - (unsigned long) tsin); + tasklet_setup(&tsin->tsklet, channel_swdemux_tsklet); return 0; From patchwork Mon Aug 17 08:31:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B4D7C433E1 for ; Mon, 17 Aug 2020 08:33:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6697C20758 for ; Mon, 17 Aug 2020 08:33:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZOndhxRJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728134AbgHQIdF (ORCPT ); Mon, 17 Aug 2020 04:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728364AbgHQIcw (ORCPT ); Mon, 17 Aug 2020 04:32:52 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0312C061388; Mon, 17 Aug 2020 01:32:52 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id i92so7644337pje.0; Mon, 17 Aug 2020 01:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BpUIfyiY1033QwITtcsFngj/BQQY04YlOMIFJZLa7+8=; b=ZOndhxRJ3kEbaFup5uwE3vRCh/fWHZK/tTXskLR+/ZHLmu2kJ6agoy8gcsU8BZgSbQ bNx+AiqivgU2wITRcKzE6YwQOFztZ+p5H6AWYfOGLc9MJkukU+jiVY2Db0tb+smV09Xb pFEC3viI/CDZFUzGwEsXRQm27W37vYPaM9vMxJdwMqjL79GhfzUjjug9fWzEe7wl4fQ5 lVSJ+ALfHyMuXyDOR3awBvGAqPX62bNsMpC23qq/nVCDllUu5DgKd1ICkUt7Qk/PQ67F GtWE3HdpmEzQTDxHoW+ss2rkANsti/yv4L3PIgXpwW/FdOD5apQZWgjwj5pCPZraRxGP yBDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BpUIfyiY1033QwITtcsFngj/BQQY04YlOMIFJZLa7+8=; b=FEjkldx3zP+W3AubP0vy0qaBYdn/GeMTw5r5eF5rJ/8/01j3tARTNsypbHuhUIjyyA wKKw9omtP9IvcwrjBxxL+IkSQRopI+O82MzCd/NZKAN1j4/x/nuqxq19tIJsMa1AwBLo u9mPcN65IPu17AQtenD+j8qZMEKAIIUmkS75Oq4eXLdJT0ntY4EP9NZLHqCyNrPjcEf1 aQw3aEW6LNEr6sjvLW3xX4hv1aO9sx9Kv4F8XzW6LljOoCZxpvNr06lrERch5WWSJvSe 5QYQa4fxNw2jAQxN+hPwQdxl3Az749/IQ2K7laHzlRpnfgZpipsSKqWkpXbrOPSNC0SG eWXg== X-Gm-Message-State: AOAM530dRCiC41KqezXpM3CL/qn+KZmk5zzy/teJdqg6uHuF5s7aV6x0 HBmhmwAu5WN+0xPtn3Piop0= X-Google-Smtp-Source: ABdhPJwaWkqCYqUBJJSToCQOkC6GsGzRFgolzc1uotq1Pm6RULRT8DqLVDN3+wpVySp9QLmAIY3Wmg== X-Received: by 2002:a17:902:968a:: with SMTP id n10mr10479044plp.67.1597653172452; Mon, 17 Aug 2020 01:32:52 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b15sm18448351pft.116.2020.08.17.01.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:32:52 -0700 (PDT) From: Allen Pais To: mchehab@kernel.org, maintainers@bluecherrydvr.com, patrice.chotard@st.com Cc: keescook@chromium.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 11/11] media: ttusb-dec: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:01:53 +0530 Message-Id: <20200817083153.22218-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.com> References: <20200817083153.22218-1-allen.lkml@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/media/usb/ttusb-dec/ttusb_dec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index b8d39b2f777f..df6c5e4a0f05 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -769,9 +769,9 @@ static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b, } } -static void ttusb_dec_process_urb_frame_list(unsigned long data) +static void ttusb_dec_process_urb_frame_list(struct tasklet_struct *t) { - struct ttusb_dec *dec = (struct ttusb_dec *)data; + struct ttusb_dec *dec = from_tasklet(dec, t, urb_tasklet); struct list_head *item; struct urb_frame *frame; unsigned long flags; @@ -1209,8 +1209,7 @@ static void ttusb_dec_init_tasklet(struct ttusb_dec *dec) { spin_lock_init(&dec->urb_frame_list_lock); INIT_LIST_HEAD(&dec->urb_frame_list); - tasklet_init(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list, - (unsigned long)dec); + tasklet_setup(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list); } static int ttusb_init_rc( struct ttusb_dec *dec)