From patchwork Mon Aug 17 08:34:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256640 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 D37A8C433E3 for ; Mon, 17 Aug 2020 08:35:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B21D22072D for ; Mon, 17 Aug 2020 08:35:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mGaGN7JD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbgHQIfd (ORCPT ); Mon, 17 Aug 2020 04:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgHQIf2 (ORCPT ); Mon, 17 Aug 2020 04:35:28 -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 3FBDAC061388; Mon, 17 Aug 2020 01:35:28 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id f9so7349135pju.4; Mon, 17 Aug 2020 01:35:28 -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=4nhWNM41f6BjKWP46DMIjPsIWGEGdOxdBi1jSC7XG8s=; b=mGaGN7JDJGgy/1WQUsKWaFTCgtC3rJsf9uTrL9370PCWKVjEpcQy9EI/xP8rVxFxDN DQIhtVNRxYd5wR3QuC/KZMts9WZPnoOmndIBmz7t+lB5n2DbwECCodBm/tqN8abCMd6W fKb81wMBVASTh9+YpvzvixeJADKQDAghKJ6T+AfCHs0fJnmHRSROgh+427SAETCDabE0 wt/mq0Z0DSqoHRUV9ZP3QzDHRLfplHZASTF3VWCHLT91w/d4h9XdXJm3+VCD5/vN2Jgn oEVypkDuBgsJrkHGE34tWKfqOJ3q+LX0nQ533oYNCTnFYVd4RZwp3maByR+ZeuvpmDue 63Xg== 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=4nhWNM41f6BjKWP46DMIjPsIWGEGdOxdBi1jSC7XG8s=; b=cOcz8LI3ZNLbzvBXzBQpF8pkCXEjI3Iz/SY/8Kntp0/NWTADnATiP3/wC7Y/WV1D8z +0tXbNxjR+na0JJQOkgfv1NL/gNSDbF0PdPTiaWt5JUEjhOl/VSQK8YLGiTqzRo2zVT2 2y4kAKmW+EpO22+pZvy+42BHhPxVRzCmNLTIY+ylIOkQ6m3x/GRUVFSn9Tl9Ddm4KDIl t79Id1944dMl0YX0zZnulkvFs89QV+8GhgQ5Xo3EifwCFL9SNF2Ei33nyBsHvZHcHcF/ S7jmd/kFyraq0ESy4eM1tSytljV3NPRxII9UlmrdVzK5iWVrQoQo351XZFgO8Mt+6ypZ Z7qg== X-Gm-Message-State: AOAM532c6GInJdGUKMJNd8lWWePkCr8PHfFeQcN+waWGMyGmNeSO2I6s CuaT8Hwu0jn0b2mBXf0E2UU= X-Google-Smtp-Source: ABdhPJwpxyd4w90B/LHzc3wDMjJl+AoxneVsdWqfIUr98hR55sv5bW17uf9nyFyU9tMklV2BSez1zg== X-Received: by 2002:a17:90a:ce94:: with SMTP id g20mr11462006pju.61.1597653327838; Mon, 17 Aug 2020 01:35:27 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id h5sm18434068pfq.146.2020.08.17.01.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:35:27 -0700 (PDT) From: Allen Pais To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, yamada.masahiro@socionext.com, brucechang@via.com.tw, HaraldWelte@viatech.com Cc: keescook@chromium.org, inux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 01/10] mmc: atmel-mci: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:04:59 +0530 Message-Id: <20200817083508.22657-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083508.22657-1-allen.lkml@gmail.com> References: <20200817083508.22657-1-allen.lkml@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/mmc/host/atmel-mci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 300901415aa2..562cf8eb993f 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -1719,9 +1719,9 @@ static void atmci_detect_change(struct timer_list *t) } } -static void atmci_tasklet_func(unsigned long priv) +static void atmci_tasklet_func(struct tasklet_struct *t) { - struct atmel_mci *host = (struct atmel_mci *)priv; + struct atmel_mci *host = from_tasklet(host, t, tasklet); struct mmc_request *mrq = host->mrq; struct mmc_data *data = host->data; enum atmel_mci_state state = host->state; @@ -2496,7 +2496,7 @@ static int atmci_probe(struct platform_device *pdev) host->mapbase = regs->start; - tasklet_init(&host->tasklet, atmci_tasklet_func, (unsigned long)host); + tasklet_setup(&host->tasklet, atmci_tasklet_func); ret = request_irq(irq, atmci_interrupt, 0, dev_name(&pdev->dev), host); if (ret) { From patchwork Mon Aug 17 08:35:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256639 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 9038FC433DF for ; Mon, 17 Aug 2020 08:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FAF8207FB for ; Mon, 17 Aug 2020 08:35:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e1rw46Ln" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgHQIfn (ORCPT ); Mon, 17 Aug 2020 04:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbgHQIfi (ORCPT ); Mon, 17 Aug 2020 04:35:38 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D366AC061388; Mon, 17 Aug 2020 01:35:37 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id 17so7877418pfw.9; Mon, 17 Aug 2020 01:35:37 -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=V+IY+0oce77n1O9F863vvzmAh9cNOoW4gGZxQ9nHc9A=; b=e1rw46Ln24gbKIg1ppq0fzzVXv+VpHghXbf9lAKfxsr2UawmfLW2T3Xl68u/n+z6UG Yk6eKFTOewcDwbK7nj37Yi28tnPWUMuM8Zdi4LhoBtd/xVsrG4qMTxyDZMRuAFByZDT8 pO3mIG7wYETBil7GuCzpqOCMZ5OL3obKg7vcxk1RHnAaWZqzoW8eoW4NIXeChY/nwTBL dt+GgPbOBnmtOVgUsKR2Mpa3w7qYVsJy7/pzvaPTEqwLHImusixvOmei2RLFxo1E5vcx O5Na8zNOJ910dHmJggjQYKZfa+cfdwTQD5a6v03q8SDH4/5kD98zLOYkNu4O5y7z9+fg X1Jg== 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=V+IY+0oce77n1O9F863vvzmAh9cNOoW4gGZxQ9nHc9A=; b=hnDYnOK1obVuWZfT5Aj2q/oZepkzpOMYIf1b99otDmA+ue6uE5BbQgMC8lCF3Zr5Uo jD8yToI9aY3qqAO5laQmDjUc670yuIMeFZzWl941THabeHbSvferkCWxSRCuRJ6nV84R e84JU9Pu1MJ5ZLNMVPlBvRYWg236RTOfGs3JjWzSAHQksfEjWUkiufvBNPszPcqDuMEn r5uFfa4QSCMqLQmOTG8BqgWxc9dISMmBgWELEq8rqQ8PN3WjimkN96mx6ius/Jkm/iNX ymy1JTtEiaQMSaZqGiQGg84yTO4V/zAeII5aOyPnBdbpSpkAlhNCNVesKFJk4dr0yFPf cWeQ== X-Gm-Message-State: AOAM5338W8OzyCfDBbjEKjuw3dOV3vr2IFcZgSlcj8Fyjw++6akW6QA8 EEew97AdikSLbT+HXOBW3qE= X-Google-Smtp-Source: ABdhPJxdR0X4pzjphQ0xJ24hWd4Gij3HiSYXjTekxa2x2+d2jVKzh0raQSM/vy36I48/+J21wkO35g== X-Received: by 2002:a63:2fc3:: with SMTP id v186mr9030009pgv.158.1597653337480; Mon, 17 Aug 2020 01:35:37 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id h5sm18434068pfq.146.2020.08.17.01.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:35:37 -0700 (PDT) From: Allen Pais To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, yamada.masahiro@socionext.com, brucechang@via.com.tw, HaraldWelte@viatech.com Cc: keescook@chromium.org, inux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 03/10] mmc: cb710: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:05:01 +0530 Message-Id: <20200817083508.22657-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083508.22657-1-allen.lkml@gmail.com> References: <20200817083508.22657-1-allen.lkml@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/mmc/host/cb710-mmc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index e84ed84ea4cc..3e8fd2850794 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -646,11 +646,12 @@ static int cb710_mmc_irq_handler(struct cb710_slot *slot) return 1; } -static void cb710_mmc_finish_request_tasklet(unsigned long data) +static void cb710_mmc_finish_request_tasklet(struct tasklet_struct *t) { - struct mmc_host *mmc = (void *)data; - struct cb710_mmc_reader *reader = mmc_priv(mmc); + struct cb710_mmc_reader *reader = from_tasklet(reader, t, + finish_req_tasklet); struct mmc_request *mrq = reader->mrq; + struct mmc_host *mmc = mrq->host; reader->mrq = NULL; mmc_request_done(mmc, mrq); @@ -718,8 +719,8 @@ static int cb710_mmc_init(struct platform_device *pdev) reader = mmc_priv(mmc); - tasklet_init(&reader->finish_req_tasklet, - cb710_mmc_finish_request_tasklet, (unsigned long)mmc); + tasklet_setup(&reader->finish_req_tasklet, + cb710_mmc_finish_request_tasklet); spin_lock_init(&reader->irq_lock); cb710_dump_regs(chip, CB710_DUMP_REGS_MMC); From patchwork Mon Aug 17 08:35:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256636 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 2DFFCC433DF for ; Mon, 17 Aug 2020 08:36:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A16D2072D for ; Mon, 17 Aug 2020 08:36:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PX4S+d8S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727880AbgHQIfv (ORCPT ); Mon, 17 Aug 2020 04:35:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbgHQIfs (ORCPT ); Mon, 17 Aug 2020 04:35:48 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A0DC061389; Mon, 17 Aug 2020 01:35:47 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id t10so7139120plz.10; Mon, 17 Aug 2020 01:35:47 -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=IwFOYY367ULZT1BN2OrQmrKwLru5AbIHU/lvBoUtbvI=; b=PX4S+d8SSzqmcDvaTTsGyA2ivQ3CN5X25wDtmjJVfFwuC6bz5NXD3ayhO28oMCUbDO MUqFNlrjccbTVa7mJEjGjRjoKHHDjjb+sFzt4o1G4Hxsvv/AqTP3OMgAhUaz79u9aB8Z Gr79ENBofDZokJfNqjT+lmbmlNmUlR0ZZOw12uQXnw0fGlYkn7xD9QZjZ6NsGUHKSfRa cyMpT73GX9xDM53F+/nqaSYDLHmLabAJJ7rTdp+WL2aSNwO1f0GfwwpZGiV0oxAVM8EW 4pYtF71te6SFr2uNpao8D98UE3ueunxEu56vEUuGDYzn0sUPXGemS9DgUSWJ/i3hQEbT /DXw== 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=IwFOYY367ULZT1BN2OrQmrKwLru5AbIHU/lvBoUtbvI=; b=WZV/dXv6jMmVOboHg/i2QVS3gAwsiPwXzdH6PeRpRRmSbfmz1fs+pcgz8+6oxhS0wp Ku2EMcYvhjLZacXyS2JbnPQPSD/4K9ilcE7Sw8n7B435WAbtKRPRibDYWVXNuzR6Rv51 Ui46qSLP2J8suFQu80g9n59eB9g+WQYvBWy7cLITMRNvS7dT54+FFouVxVNN5we5+VCT a9viKxez1B/QOh9ul5Sj4OGCanEEsjYO2WuCsH1xx/M63B/FHvNpYRSdu9t8jugUfrbm 8PVlFN97vxhIClgwtE1GuKJN5OXZ3A27fNcAa20x4c7v4kjW1u4ttCkVIK3fXdTtp5Ch ZHLw== X-Gm-Message-State: AOAM530sP4QySvBE6fvAYt7EnPuDog4UnZKr43JvMXh3+W0PluHgVi24 jPkbeuPCe2IBAypeAZI8BMc= X-Google-Smtp-Source: ABdhPJzuuZWms7RUMkI6+RPWhuqqeB3lLRfxRvIP7v4EbXz/ZUmf08sunStIEL/0sx81A2cvBjvJvw== X-Received: by 2002:a17:902:441:: with SMTP id 59mr10581843ple.282.1597653347062; Mon, 17 Aug 2020 01:35:47 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id h5sm18434068pfq.146.2020.08.17.01.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:35:46 -0700 (PDT) From: Allen Pais To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, yamada.masahiro@socionext.com, brucechang@via.com.tw, HaraldWelte@viatech.com Cc: keescook@chromium.org, inux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 05/10] mmc: omap: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:05:03 +0530 Message-Id: <20200817083508.22657-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083508.22657-1-allen.lkml@gmail.com> References: <20200817083508.22657-1-allen.lkml@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/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 33d7af7c7762..9852263cef4d 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 Mon Aug 17 08:35:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256638 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 F1C68C433E1 for ; Mon, 17 Aug 2020 08:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDE512072D for ; Mon, 17 Aug 2020 08:35:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fgRJUvQ3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbgHQIf4 (ORCPT ); Mon, 17 Aug 2020 04:35:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbgHQIfx (ORCPT ); Mon, 17 Aug 2020 04:35:53 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83129C061388; Mon, 17 Aug 2020 01:35:53 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id u10so7146225plr.7; Mon, 17 Aug 2020 01:35:53 -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=PEGr9s6HGNxR8mzsZcOi/x3TsiaJrj80ASltnmxTvts=; b=fgRJUvQ3c3dalXzfHwldW9gKnPepaFA36zwdwrOZRVqh2L6fA7py884ow8ug8OqjqD IXYG9u/RrsV/s3xQ+UtY82VEU38rTrg+lft/fF/mpTS54rK52fJcjKB0l0ghXLKb4LCO 9sPEQaWI0f8zNAJKjS03gBFwlFydMubz7ANuiB7h4WQRIYodmWW+08YmTS71hS2rp8Yn x1rwTpfTLlJTc0/0g1OvBEG/3Aj/fMkhVmbWXG6++VzeLX3NB6j0OXsItgc0qt47e86T 9G75ApMOq/zQD0jYL1rAMJXvsAFKLzTt7c6zwSqIuun1oDe3PY9LC24MvWdX0yidyK9d 7KOQ== 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=PEGr9s6HGNxR8mzsZcOi/x3TsiaJrj80ASltnmxTvts=; b=TvDqkug+VMz3jZfn3vDZsZ492FulXD0J9EL6VWa1P4FP6WmWQYlaTGyTvwQ2ekhDae mx4fs4ApEeWcYHkJceLuzdjrmAnmri4lIzPlKSXdzKfmpvXJzplaLpxSGlishY+ovPX9 5FFNPIWJzr2uYD2s2y+XFc0AVkB9Nf7bL3grbp8oDHk7nptoXuMRoqncTGtd2lnxVnHA dFHwI2v/XlHwLxIych0L2EoPQMileNqJI0m2TtHecayz0YkEI0eO+6O6WbMNG/7XblZl B2RKrfSuaAUocPsEn7ZByDwG7VHWpdXIAGbDaV2hnxa/Hhu0iakk1dHAoUaw4DlOlrXj oFWQ== X-Gm-Message-State: AOAM532QR0FUc4frhtCOV4iRm06YpDcSf2DJtKGwzOl0A901G58OP6aY XXcBPzSUDkLOyvF3Q004EVk= X-Google-Smtp-Source: ABdhPJxHHjf2l9lVu7pUt2dTiicTOD/n6pAnbvbGFIvNk9geL9SzW87cnZs77W7gkbYWLQTahXgzUQ== X-Received: by 2002:a17:902:9a09:: with SMTP id v9mr10140335plp.331.1597653351613; Mon, 17 Aug 2020 01:35:51 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id h5sm18434068pfq.146.2020.08.17.01.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:35:51 -0700 (PDT) From: Allen Pais To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, yamada.masahiro@socionext.com, brucechang@via.com.tw, HaraldWelte@viatech.com Cc: keescook@chromium.org, inux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 06/10] mmc: renesas: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:05:04 +0530 Message-Id: <20200817083508.22657-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083508.22657-1-allen.lkml@gmail.com> References: <20200817083508.22657-1-allen.lkml@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/mmc/host/renesas_sdhi.h | 1 + drivers/mmc/host/renesas_sdhi_core.c | 2 ++ drivers/mmc/host/renesas_sdhi_internal_dmac.c | 20 +++++++++---------- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 9 ++++----- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index 14c64caefc64..79a86bccc0ec 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -48,6 +48,7 @@ struct tmio_mmc_dma { }; struct renesas_sdhi { + struct platform_device *pdev; struct clk *clk; struct clk *clk_cd; struct tmio_mmc_data mmc_data; diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 15e21894bd44..4a9319743eb6 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -975,6 +975,8 @@ int renesas_sdhi_probe(struct platform_device *pdev, goto eirq; } + priv->pdev = pdev; + dev_info(&pdev->dev, "%s base at %pa, max clock rate %u MHz\n", mmc_hostname(host->mmc), &res->start, host->mmc->f_max / 1000000); diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 32ab991544ef..3d8866581043 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -218,9 +218,9 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host, renesas_sdhi_internal_dmac_enable_dma(host, false); } -static void renesas_sdhi_internal_dmac_issue_tasklet_fn(unsigned long arg) +static void renesas_sdhi_internal_dmac_issue_tasklet_fn(struct tasklet_struct *t) { - struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; + struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue); tmio_mmc_enable_mmc_irqs(host, TMIO_STAT_DATAEND); @@ -255,9 +255,11 @@ static bool renesas_sdhi_internal_dmac_complete(struct tmio_mmc_host *host) return true; } -static void renesas_sdhi_internal_dmac_complete_tasklet_fn(unsigned long arg) +static void renesas_sdhi_internal_dmac_complete_tasklet_fn(struct tasklet_struct *t) { - struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; + struct renesas_sdhi *priv = from_tasklet(priv, t, + dma_priv.dma_complete); + struct tmio_mmc_host *host = platform_get_drvdata(priv->pdev); spin_lock_irq(&host->lock); if (!renesas_sdhi_internal_dmac_complete(host)) @@ -289,12 +291,10 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host, /* Each value is set to non-zero to assume "enabling" each DMA */ host->chan_rx = host->chan_tx = (void *)0xdeadbeaf; - tasklet_init(&priv->dma_priv.dma_complete, - renesas_sdhi_internal_dmac_complete_tasklet_fn, - (unsigned long)host); - tasklet_init(&host->dma_issue, - renesas_sdhi_internal_dmac_issue_tasklet_fn, - (unsigned long)host); + tasklet_setup(&priv->dma_priv.dma_complete, + renesas_sdhi_internal_dmac_complete_tasklet_fn); + tasklet_setup(&host->dma_issue, + renesas_sdhi_internal_dmac_issue_tasklet_fn); } static void diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index 13ff023fbee9..cd638e638db6 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -310,9 +310,9 @@ static void renesas_sdhi_sys_dmac_start_dma(struct tmio_mmc_host *host, } } -static void renesas_sdhi_sys_dmac_issue_tasklet_fn(unsigned long priv) +static void renesas_sdhi_sys_dmac_issue_tasklet_fn(struct tasklet_struct *t) { - struct tmio_mmc_host *host = (struct tmio_mmc_host *)priv; + struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue); struct dma_chan *chan = NULL; spin_lock_irq(&host->lock); @@ -399,9 +399,8 @@ static void renesas_sdhi_sys_dmac_request_dma(struct tmio_mmc_host *host, goto ebouncebuf; init_completion(&priv->dma_priv.dma_dataend); - tasklet_init(&host->dma_issue, - renesas_sdhi_sys_dmac_issue_tasklet_fn, - (unsigned long)host); + tasklet_setup(&host->dma_issue, + renesas_sdhi_sys_dmac_issue_tasklet_fn); } renesas_sdhi_sys_dmac_enable_dma(host, true); From patchwork Mon Aug 17 08:35:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 256637 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 CA573C433DF for ; Mon, 17 Aug 2020 08:36:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA9F720758 for ; Mon, 17 Aug 2020 08:36:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DhF6t+2Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727774AbgHQIgH (ORCPT ); Mon, 17 Aug 2020 04:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728033AbgHQIgC (ORCPT ); Mon, 17 Aug 2020 04:36:02 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4557C061388; Mon, 17 Aug 2020 01:36:01 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id l60so7464961pjb.3; Mon, 17 Aug 2020 01:36:01 -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=j1L+zCWhXn/joke0t0DEH3dC8tZXKifv8sB6Zyw25w8=; b=DhF6t+2YP62P4iucghZREd6z6ii87qeNjWHRLa58Jly/lbHh+MMjkxFsuXMKCdVKde kkL81Q/PjVnVxhRvGnr1pvI6akB26SaQsHG6Ocnaxgwn7vQhln4IJulE+Wg0ydo/JF2u rN0GW9sq70mmhZTq76lKYkveUQcW2GAQ/anH/cMJQRrs1tcybAyNp42almY/4uh9qMTh m0ECMMuhXMSDd+WhuP3ivVXLJGxVOiPeJeH7s6d6wlbzSL5XsTVxfeucrbrhR2trt0SA BvCYDOR/jscEP/NpGfw3GcyasWS8W6zkCLzDlAA9Cm+CtxDsdq+P6lqZ//Dngkveu/6R hg+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=j1L+zCWhXn/joke0t0DEH3dC8tZXKifv8sB6Zyw25w8=; b=p1Dlzuw/qC4cRDkA1JsvSNzo18z8HsNRxAXLdHmxXg4XmibGNavzLy4Z0TB2Puw8kl ylsMpU7YBeSObSQEyDT9lkFK9wQvhOKHGAIx2dbK7Uxdu5ScvM05pcBYFEdPnKQNgF+V uR8GtdT54K4H6HnZm4I473/iwTdNumaqspMzktuvP0mIAT2NqFJBvHLu3fUugR457f9m vQmWKFh/t1ZoQ6mAI2bfiAVA0FvBhYENljyhaP9X9BOoF33NkUt4eQKlRy8M8zxCQciN IsbQaeMH07ufW+5asg8PEdbjkaY3MK6Tk/JO2c6Lcs6M3e0bxpqQzDY9sNQU+Vb7o0iY giOA== X-Gm-Message-State: AOAM532kFaqem2PHy4CnICV3v1yiTpQS6jqbnACig8Yogl61+8ZFd42W qVavMBepQ6z+5fYUN0vwdBs= X-Google-Smtp-Source: ABdhPJyc0TiP72f7uRdnYv6rQAyV9Lbfk3OCsMGXPxXNPAnOT6Q+GGj6oLVMmyApEYWY9WFadWlkig== X-Received: by 2002:a17:902:d90e:: with SMTP id c14mr10225733plz.37.1597653361223; Mon, 17 Aug 2020 01:36:01 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id h5sm18434068pfq.146.2020.08.17.01.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:36:00 -0700 (PDT) From: Allen Pais To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, yamada.masahiro@socionext.com, brucechang@via.com.tw, HaraldWelte@viatech.com Cc: keescook@chromium.org, inux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 08/10] mmc: tifm_sd: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:05:06 +0530 Message-Id: <20200817083508.22657-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817083508.22657-1-allen.lkml@gmail.com> References: <20200817083508.22657-1-allen.lkml@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/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 5987656e0474..c64cf12b117a 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;