From patchwork Thu Feb 4 15:18:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 376612 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 8BF2CC433E0 for ; Thu, 4 Feb 2021 15:20:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5ADE664E41 for ; Thu, 4 Feb 2021 15:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237179AbhBDPUg (ORCPT ); Thu, 4 Feb 2021 10:20:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237223AbhBDPTt (ORCPT ); Thu, 4 Feb 2021 10:19:49 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAD41C061788; Thu, 4 Feb 2021 07:19:09 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id y18so4522479edw.13; Thu, 04 Feb 2021 07:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kA7iM6G+tHsHX5qw3wt51wVo7E+zCJZCLkoKnrDKq4Y=; b=W4cfV5/0dL0av9SOsoeYkRGZsmBPL2hqK42EOZerpGQsi95XPA4dnspkZkdpAAMxSV pkb1zX3XZmCCxKcJYAZ2QT8iUpEbAXozdkFoXAcgvC9vCHP4mWtSdBjYteMEQnpxQ+M9 4ZT7Rg5fFI+ziKmlcRx3AE9wuiTaZhQWlslkBkfz1JdfvwAbG7AQI2EHg/hs1LRkYx2u 9QZF+bsyZ8HOUIeZ/32EINf43pmwMmIJgv6ilOFsU4JRaLTuQn2Dt2b5AgSzB9U0aKUy +lMc95NaqxZwzHg/4lAZl7JAeQQeoXe7gxLfXRs2NfoDKGIMeqn5fXKbcBHPfZRRvmQ5 jTAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kA7iM6G+tHsHX5qw3wt51wVo7E+zCJZCLkoKnrDKq4Y=; b=cwLATTB/HNGus3jX8HnhtK7QSpeTlVw2TrfjC5SiLcOeFUKfaliKb6RuMUWuvl50Nk nHGPrp4e1i5SbF97osWvrprGL1Fc/FITTyvjlGO4EuA5qG7HR0PKnZActLC5SfMLRZsn BwJY69lAKrpqD8HD6OKBFhSU84PMucmRHU65d0BuA5LeIMU2oVuKaa1q22Ww9T+egh9y fQ+AHRwtT3+TJBjAejI8pAtm0nLuLH1VjCOFujoT4IT7IBZVL1DhVZWAopOj3CGptbWG mdIzKYEIUDTXvAJlfuuz1dtT3QhLU7hpkLWDDx4Fxn7zxa7+bLxn2rDD2PvtUea72q2y fn6Q== X-Gm-Message-State: AOAM530nt6kpuXA3+oUw6D5JOiEWn+OI5RS7DINnRWA9pIZulbVPhXrc Fp63U0SCwL9R/iH0yhTLrrMsKiRhYAhPu+Kn X-Google-Smtp-Source: ABdhPJwfG3Ce99XsaCXs91f6lfYXHfdV7XQFeKGSYxh2mMSowdr1KYmIsT98CTsuVcyOQJJGG9coHQ== X-Received: by 2002:a05:6402:3487:: with SMTP id v7mr8562518edc.68.1612451948549; Thu, 04 Feb 2021 07:19:08 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:08 -0800 (PST) Sender: Emil Renner Berthing From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: Emil Renner Berthing , Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Manuel Lauss , Jaehoon Chung , Aaro Koskinen , Ben Dooks , Alex Dubov , Bruce Chang , Harald Welte , Pierre Ossman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] mmc: au1xmmc: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:40 +0100 Message-Id: <20210204151847.91353-3-kernel@esmil.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204151847.91353-1-kernel@esmil.dk> References: <20210204151847.91353-1-kernel@esmil.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing --- drivers/mmc/host/au1xmmc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index bd00515fbaba..0acc237843f7 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -253,9 +253,9 @@ static void au1xmmc_finish_request(struct au1xmmc_host *host) mmc_request_done(host->mmc, mrq); } -static void au1xmmc_tasklet_finish(unsigned long param) +static void au1xmmc_tasklet_finish(struct tasklet_struct *t) { - struct au1xmmc_host *host = (struct au1xmmc_host *) param; + struct au1xmmc_host *host = from_tasklet(host, t, finish_task); au1xmmc_finish_request(host); } @@ -363,9 +363,9 @@ static void au1xmmc_data_complete(struct au1xmmc_host *host, u32 status) au1xmmc_finish_request(host); } -static void au1xmmc_tasklet_data(unsigned long param) +static void au1xmmc_tasklet_data(struct tasklet_struct *t) { - struct au1xmmc_host *host = (struct au1xmmc_host *)param; + struct au1xmmc_host *host = from_tasklet(host, t, data_task); u32 status = __raw_readl(HOST_STATUS(host)); au1xmmc_data_complete(host, status); @@ -1037,11 +1037,9 @@ static int au1xmmc_probe(struct platform_device *pdev) if (host->platdata) mmc->caps &= ~(host->platdata->mask_host_caps); - tasklet_init(&host->data_task, au1xmmc_tasklet_data, - (unsigned long)host); + tasklet_setup(&host->data_task, au1xmmc_tasklet_data); - tasklet_init(&host->finish_task, au1xmmc_tasklet_finish, - (unsigned long)host); + tasklet_setup(&host->finish_task, au1xmmc_tasklet_finish); if (has_dbdma()) { ret = au1xmmc_dbdma_init(host); From patchwork Thu Feb 4 15:18:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 376608 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 5576EC433DB for ; Thu, 4 Feb 2021 16:04:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 268B764F51 for ; Thu, 4 Feb 2021 16:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237720AbhBDQD6 (ORCPT ); Thu, 4 Feb 2021 11:03:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236966AbhBDPTy (ORCPT ); Thu, 4 Feb 2021 10:19:54 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B92C06178B; Thu, 4 Feb 2021 07:19:14 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id t5so4531753eds.12; Thu, 04 Feb 2021 07:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MXxWaP3OMD24RnZ/OSVIIbiGQ1wOqMXQ3YDzBvlfZKc=; b=Y9ukjEkFtjspHv5gHEuPAtYlxRPD5EcQz/cPxJRYXU/NRBX67UiJU5GQZr03n9ZZ6e OR3+LT9H5tAY7svvli7sOSAIQttxbqbYnxgPNG4uXWN41N/2uzVwv0PRfk/eGdFT/iVV Dhuyv/lB2naVSMm2OgKyCBEUzzlmPj/726yvckg6V7Yo2pB646XbBBQu1DUnSS6p/Nrx CxgGIfCQ8zmqp0qBvlPf8nvIuzIoxmM9wEML2s5TtE30SW5tZVzuakVPAJF/ZO/irGzD YaEVCAJ0HvEB3dRMmugCdgLSN+rsab8QoclToeqBkUQcEnv1Yko17CQRNZuN8KMklPZR Rvqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MXxWaP3OMD24RnZ/OSVIIbiGQ1wOqMXQ3YDzBvlfZKc=; b=C4r84de4kvcZ1wD0aqAoEoyDSRzK/enHfObdeTub2ciEWiG5B7w+ZxD/UtTO9qcmpM EXCVdXPysqfUA9T6p6t2TJDvSJjLQpT9RcVdaxSQJE1Z8kgiM0M7JWVF/1XadHN7c60V 1BB2A4xoYha3xOuEhtMUh66ZgfGgXhT+xviMuxCDZzPKUBGQfezkUOzkly2Ok9qpm/91 tBBsBrakXYQrEXNJRrOC+jcPuvUWAw3DzvSpOhBxIbkgTmkx3rgslaj4wUKhC9cDfv2w cPJzK3hcs7t0AoKJw3sE7gzBDnKVWjq86Iv2oXU2Svly3n2VICiO4bkkh9wdn01PkXIY Y3YQ== X-Gm-Message-State: AOAM532PEGMXny1TTVdelF/GCehL8u+u6vI5lK8SfNZY5ABwpgtMo/Ko jdNN+AyQrtMyqZhKla48bLZlglnYNafdKoDX X-Google-Smtp-Source: ABdhPJyPq3p6MXw+NKWx1K05eqiXDRYZGsAJgrrr++6DtWr4V3jzMLDk8+xPLi3Fi+f7Z1ImdeULrA== X-Received: by 2002:a50:8466:: with SMTP id 93mr8342762edp.55.1612451951546; Thu, 04 Feb 2021 07:19:11 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:10 -0800 (PST) Sender: Emil Renner Berthing From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: Emil Renner Berthing , Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Manuel Lauss , Jaehoon Chung , Aaro Koskinen , Ben Dooks , Alex Dubov , Bruce Chang , Harald Welte , Pierre Ossman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] mmc: omap: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:42 +0100 Message-Id: <20210204151847.91353-5-kernel@esmil.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204151847.91353-1-kernel@esmil.dk> References: <20210204151847.91353-1-kernel@esmil.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing --- drivers/mmc/host/omap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6aa0537f1f84..5e5af34090f1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -878,9 +878,9 @@ static void mmc_omap_cover_timer(struct timer_list *t) tasklet_schedule(&slot->cover_tasklet); } -static void mmc_omap_cover_handler(unsigned long param) +static void mmc_omap_cover_handler(struct tasklet_struct *t) { - struct mmc_omap_slot *slot = (struct mmc_omap_slot *)param; + struct mmc_omap_slot *slot = from_tasklet(slot, t, cover_tasklet); int cover_open = mmc_omap_cover_is_open(slot); mmc_detect_change(slot->mmc, 0); @@ -1269,8 +1269,7 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, int id) if (slot->pdata->get_cover_state != NULL) { timer_setup(&slot->cover_timer, mmc_omap_cover_timer, 0); - tasklet_init(&slot->cover_tasklet, mmc_omap_cover_handler, - (unsigned long)slot); + tasklet_setup(&slot->cover_tasklet, mmc_omap_cover_handler); } r = mmc_add_host(mmc); From patchwork Thu Feb 4 15:18:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 376611 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 EC659C433E0 for ; Thu, 4 Feb 2021 15:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA58364E08 for ; Thu, 4 Feb 2021 15:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237243AbhBDPVS (ORCPT ); Thu, 4 Feb 2021 10:21:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237111AbhBDPVA (ORCPT ); Thu, 4 Feb 2021 10:21:00 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A974C061793; Thu, 4 Feb 2021 07:19:17 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id l12so4617357edt.3; Thu, 04 Feb 2021 07:19:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4t6PsBrxLZ5UTEGPBoOEAai2ONn3/gIQgFeqq55RME0=; b=dl7XayJ5ZZtlj2NxoVsVvbvmImyaVKnGXuxpCPR+o9CYjyWD/tFlLmIIf3GkKH6iNf nuRX7RpF+nb9qOBAJova7MSSQ2cadUwIhSKNBxhXu4Xyewmn5KXnx/WfSbwyo3hSB4sw ufSFB2d0KutTspXPxf7PukV/mRlpu5bBa64UkJHC2rv0sBsPPJfvKKUIIRGvRoucwoWm 4kGU/8xWYMXMupMpO9I8MeseYxgIkMKHrOu6VX9IylQV0RSbLpHSzuiV/jGQn2fcQS/7 sfMucw4Z+YxC0G+Iil/LqohjxbaLkO/miES8JKc4SoeFgVIJ0C2CbBe9YrfkYbPtzB6d kqqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4t6PsBrxLZ5UTEGPBoOEAai2ONn3/gIQgFeqq55RME0=; b=qsAxvGzj+jcpebynKR9oGUQF/fFFceJyqXxw7XDGu4+HkNSXMP44EElaiaUBYcREje tuXIfkHeV/K1SDNHthmmT4/RMMEtykfxhN1uSp/Es2H5KdhY346hLqCsmh7rudYcC3Xo c1lw3QjQgRv2ZjOwiALJMnXmmhPW+h49qBOTFI3axYHdkuFeGm1LVC9CjzIZuOmMVwAV 52a8cX/7bFq5/2lao+WC847OHshJjQGDjYEDgPPhxKqy2rR6JB/ciNXcE3+EFW58r9Mo mkoTXkA4cKcF1YDeer98LSdDFaelxm32RsNI65x7rNhNN59lcs1n/WdWWLBNoNpaiNTy qeIA== X-Gm-Message-State: AOAM5306UXhDi/5lcRY0RfAtTxzG9p2FlXkRa+eVWjSxuCdurIJdzg1B QW0YLyMxss0cX7f8pVP266+DXAYXZm3/AZlR X-Google-Smtp-Source: ABdhPJzjyf4iJXj0C/1GfT9PvnICS23k9kQYo+BRNVNiF2+Upy/bNN6K1UgKwUZ3NJV9xENOVOzYQQ== X-Received: by 2002:a05:6402:208:: with SMTP id t8mr8345346edv.189.1612451956240; Thu, 04 Feb 2021 07:19:16 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:15 -0800 (PST) Sender: Emil Renner Berthing From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: Emil Renner Berthing , Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Manuel Lauss , Jaehoon Chung , Aaro Koskinen , Ben Dooks , Alex Dubov , Bruce Chang , Harald Welte , Pierre Ossman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] mmc: tifm_sd: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:44 +0100 Message-Id: <20210204151847.91353-7-kernel@esmil.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204151847.91353-1-kernel@esmil.dk> References: <20210204151847.91353-1-kernel@esmil.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing --- drivers/mmc/host/tifm_sd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index fd8b72d3e02c..9fdf7ea06e3f 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c @@ -731,9 +731,9 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) mmc_request_done(mmc, mrq); } -static void tifm_sd_end_cmd(unsigned long data) +static void tifm_sd_end_cmd(struct tasklet_struct *t) { - struct tifm_sd *host = (struct tifm_sd*)data; + struct tifm_sd *host = from_tasklet(host, t, finish_tasklet); struct tifm_dev *sock = host->dev; struct mmc_host *mmc = tifm_get_drvdata(sock); struct mmc_request *mrq; @@ -968,8 +968,7 @@ static int tifm_sd_probe(struct tifm_dev *sock) */ mmc->max_busy_timeout = TIFM_MMCSD_REQ_TIMEOUT_MS; - tasklet_init(&host->finish_tasklet, tifm_sd_end_cmd, - (unsigned long)host); + tasklet_setup(&host->finish_tasklet, tifm_sd_end_cmd); timer_setup(&host->timer, tifm_sd_abort, 0); mmc->ops = &tifm_sd_ops; From patchwork Thu Feb 4 15:18:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 376609 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 168A8C4332D for ; Thu, 4 Feb 2021 15:22:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D808D64E08 for ; Thu, 4 Feb 2021 15:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237279AbhBDPW1 (ORCPT ); Thu, 4 Feb 2021 10:22:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237230AbhBDPVD (ORCPT ); Thu, 4 Feb 2021 10:21:03 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 039C1C061794; Thu, 4 Feb 2021 07:19:19 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id c6so4637593ede.0; Thu, 04 Feb 2021 07:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oEFEAmIXC+si+Rsqnq5kk8ZiqPQSzbKTorEVbnyUtrQ=; b=Hfqb1+4R1GUz/Fq49+JCqN+pc8rKpE2gGtfvjDDmxll15xVwGMrHW+vIvMUrM/X/ZV AXGGEWknQyVw6tbyUbuUiekt+svajALlZW/cFplCV9Q9gPEp2myYaVaHYcnMsoUNAbMg LMLH+hB3PsItBvcL3c8lar4QvYq+1hyuGBhyGCg1oPOZHP+3t3qT6+aaPA1++GN/1ucO QEsCbOAmgNwpxkvLV/w6ZP7VxH5jvEe9T20N2tIu/0QzCyuI042GlnNBpBxz8AolrID/ t7rdr8OXwjjWmQJyzK9ciOrFMpECdBAkZRPAS+iY+Ui/+Wu15KuaeHiZVjSGp8ytLoEO NoqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oEFEAmIXC+si+Rsqnq5kk8ZiqPQSzbKTorEVbnyUtrQ=; b=iVjFtsSY7JqVapFIZG82qM7OVFcxpUJh/A6dnkYao0fFRldQSnenS73o5suG8ZprLp A52mksG5QtjEOCZcjVM8AnEd91mulRRsRparaxOFs//uLOhj58tK9Eglxl6EkO4zkSMB rEnAzVhJnNhktnx6t31lu9gsh/kE2qEvfp5wTf7vluxu0wCkdrDCWwv/tq8BBK7So+mn WuqJaLQXCZhwC76M3E9MK79jGpqf6DaL9WCRoYtXDx8x6nJdVIv1UqJzyFBjR4cQeVsy AdN/eJUVaHTlOMHeKfxgSVBQX8slkQOFVeIdpBLFiXL5M5829TliifL5VgmdAPZsmFu1 qjAQ== X-Gm-Message-State: AOAM530RP4zhBqfIUWzSv8SG73U2HkmFQjbEy6jkjiI0QibfCI91UMqb M7ny9D5EKww63Ai0kM6YI14sm6OIWST7/Wbo X-Google-Smtp-Source: ABdhPJx/K6k06YoQR/hwfftcPlygX5tTSIxSg+9Is6MP8I2y+HmHxOno8nh+obmf63KnWwXXtRF/9A== X-Received: by 2002:aa7:de10:: with SMTP id h16mr8440874edv.385.1612451957817; Thu, 04 Feb 2021 07:19:17 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:17 -0800 (PST) Sender: Emil Renner Berthing From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: Emil Renner Berthing , Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Manuel Lauss , Jaehoon Chung , Aaro Koskinen , Ben Dooks , Alex Dubov , Bruce Chang , Harald Welte , Pierre Ossman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] mmc: uniphier-sd: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:45 +0100 Message-Id: <20210204151847.91353-8-kernel@esmil.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204151847.91353-1-kernel@esmil.dk> References: <20210204151847.91353-1-kernel@esmil.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing --- drivers/mmc/host/uniphier-sd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index a6cd16771d4e..2413b6750cec 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -81,9 +81,9 @@ static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable) } /* external DMA engine */ -static void uniphier_sd_external_dma_issue(unsigned long arg) +static void uniphier_sd_external_dma_issue(struct tasklet_struct *t) { - struct tmio_mmc_host *host = (void *)arg; + struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue); struct uniphier_sd_priv *priv = uniphier_sd_priv(host); uniphier_sd_dma_endisable(host, 1); @@ -190,8 +190,7 @@ static void uniphier_sd_external_dma_request(struct tmio_mmc_host *host, host->chan_rx = chan; host->chan_tx = chan; - tasklet_init(&host->dma_issue, uniphier_sd_external_dma_issue, - (unsigned long)host); + tasklet_setup(&host->dma_issue, uniphier_sd_external_dma_issue); } static void uniphier_sd_external_dma_release(struct tmio_mmc_host *host) @@ -228,9 +227,9 @@ static const struct tmio_mmc_dma_ops uniphier_sd_external_dma_ops = { .dataend = uniphier_sd_external_dma_dataend, }; -static void uniphier_sd_internal_dma_issue(unsigned long arg) +static void uniphier_sd_internal_dma_issue(struct tasklet_struct *t) { - struct tmio_mmc_host *host = (void *)arg; + struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue); unsigned long flags; spin_lock_irqsave(&host->lock, flags); @@ -309,8 +308,7 @@ static void uniphier_sd_internal_dma_request(struct tmio_mmc_host *host, host->chan_tx = (void *)0xdeadbeaf; - tasklet_init(&host->dma_issue, uniphier_sd_internal_dma_issue, - (unsigned long)host); + tasklet_setup(&host->dma_issue, uniphier_sd_internal_dma_issue); } static void uniphier_sd_internal_dma_release(struct tmio_mmc_host *host) From patchwork Thu Feb 4 15:18:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 376610 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 817D1C43381 for ; Thu, 4 Feb 2021 15:22:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B3A264DDA for ; Thu, 4 Feb 2021 15:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237277AbhBDPWX (ORCPT ); Thu, 4 Feb 2021 10:22:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237232AbhBDPVD (ORCPT ); Thu, 4 Feb 2021 10:21:03 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20960C061797; Thu, 4 Feb 2021 07:19:20 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id w2so5853182ejk.13; Thu, 04 Feb 2021 07:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N2WmQEa3BjX3ncRzYIQrV88zAWNTStgvbrnt2gC25ds=; b=pLrqpZXobX/BN7V31Gin+rlULIYKilZRzPSg2xhaB7QQRja338SqRQYtB6sGduQR6t SpkFueZqQlQUV7s0D3t+VDoe2OSx3ZQ0jF8NNjnVGSKhdjjt3tv39fLJ6FokgRPf6MDH HIYJ4A1t11mjke3xCrDwNitdGe8s5t7C0rF+tmMcLoAFmsI0NHv3u1paYz6DizW7Dcee qJoPTnP501IOro5fX5d8YLp6cRf4/vCXxKn13ukVgCE97I6qboXn70vSgi53QRPGiG2P N3+dVCm3EcSc/1p1hABKXa0ZdSbboQHX9IAigI+SaCiwDVU4Pn7GcYbT3dGKlebfQsU7 Jk3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=N2WmQEa3BjX3ncRzYIQrV88zAWNTStgvbrnt2gC25ds=; b=GT6wxKKAUTT7B1HpFmRqa4qQkaNY/aatj0nixyL/E9yeUIGaZ8iYCy2lrta7lM97aK 8cN8cqDf9rBx4FsMX8sxXZAZ6usnLCtU9SktG0AnqDj42+0E3ETTASbQ55ab6NXCliKP nkfjrPxnDO3S+o4gyBDxWm8H8BsTY2Mmq80viwfEEuMeJ+9NI7fwInnjwSAKY0dUpLHj vR6thRO+jqjIYg6zwwhs1ElWsge2F6nWrPg3H4AYC9l4DzNdfCJukiQ5KWjvQUY6yez4 N1pAeFmTyShJsaujGKKeb1r25wjQjFqvz+G5HeNuluXqVfCV38Iv1SpwAVAGBFUmw+Jq s87g== X-Gm-Message-State: AOAM531MCXLY4vnGMgnHjt1wL/QHcVWaqG42rVc1Xuiw0jUOSdVCFskO QAVHuVi57YKeXAFik1j4J6IPid5lqC+GjyCE X-Google-Smtp-Source: ABdhPJwiILFpv5ahW61oLwlmasbtA/F6ia/OU2V3dbtBa3foPSZ6iMEwvO2Wb0/LY/T3k2+HMO4nDw== X-Received: by 2002:a17:906:43d7:: with SMTP id j23mr4464993ejn.519.1612451958882; Thu, 04 Feb 2021 07:19:18 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:18 -0800 (PST) Sender: Emil Renner Berthing From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: Emil Renner Berthing , Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Manuel Lauss , Jaehoon Chung , Aaro Koskinen , Ben Dooks , Alex Dubov , Bruce Chang , Harald Welte , Pierre Ossman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] mmc: via-sdmmc: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:46 +0100 Message-Id: <20210204151847.91353-9-kernel@esmil.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204151847.91353-1-kernel@esmil.dk> References: <20210204151847.91353-1-kernel@esmil.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing --- drivers/mmc/host/via-sdmmc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c index 9b755ea0fa03..4f4c0813f9fd 100644 --- a/drivers/mmc/host/via-sdmmc.c +++ b/drivers/mmc/host/via-sdmmc.c @@ -959,14 +959,12 @@ static void via_sdc_timeout(struct timer_list *t) spin_unlock_irqrestore(&sdhost->lock, flags); } -static void via_sdc_tasklet_finish(unsigned long param) +static void via_sdc_tasklet_finish(struct tasklet_struct *t) { - struct via_crdr_mmc_host *host; + struct via_crdr_mmc_host *host = from_tasklet(host, t, finish_tasklet); unsigned long flags; struct mmc_request *mrq; - host = (struct via_crdr_mmc_host *)param; - spin_lock_irqsave(&host->lock, flags); del_timer(&host->timer); @@ -1050,8 +1048,7 @@ static void via_init_mmc_host(struct via_crdr_mmc_host *host) INIT_WORK(&host->carddet_work, via_sdc_card_detect); - tasklet_init(&host->finish_tasklet, via_sdc_tasklet_finish, - (unsigned long)host); + tasklet_setup(&host->finish_tasklet, via_sdc_tasklet_finish); addrbase = host->sdhc_mmiobase; writel(0x0, addrbase + VIA_CRDR_SDINTMASK);