From patchwork Thu Feb 4 15:18:47 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: 12067543 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 80724C433E9 for ; Thu, 4 Feb 2021 15:21:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 313CC64E41 for ; Thu, 4 Feb 2021 15:21:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 313CC64E41 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=esmil.dk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0tQWzEnbIwWpYizya24/7X7ClMwhtZZvD8VedqfZW4A=; b=3fRhK+81Ec/Sg77HvX6Mk+V6O DHrEzHHmGJyftVgRRsjr9jdMmWAe4U07Ij6XNvCsJGGYmDbZto/f/HS+C9VjPW4vLTjb8V4TPWtfx LpEmpn3inr7W9oUen3ylBaMD7RIqpDMK8crM1/Z6zC3CQ2JR5/OKCSVAnl7mtUcmNfPL2/3cOlnFq HarSrZOtEUt49XdozUT0DZ5wYbLo7vwQL/dIF0u7YCcS2CkQvI9RR0G08iZQiSnCffS+nukjRrQZG HTdjbvaDsdiepYkjQOjDilDVgK/FgzpksTHAqca6s4hpeTaDY5vjDGOV3/x9aj4qFkReC+ShEvsCQ 9dqCa3tUg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7gQK-0008R7-RU; Thu, 04 Feb 2021 15:20:00 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7gPh-0008A7-Rx for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 15:19:24 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a9so5983373ejr.2 for ; Thu, 04 Feb 2021 07:19:21 -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=wQ9by59LAdcIL3bSIKYDI9kndSMy8tWgVlnC5RbynYs=; b=opVvsoKs6fxs4JdWQRnvYzqXR7VEn8BznKZMz4nb66HF+eQR7Ad9vgFqOydnNcedv6 pmDir5TIfbNsZuIWs/PEKHgVU4ZF4737+NaCIJ20t5ET7qMvflHc+OpGISceSbALeGQj tw+BTNebvCM1dABqMGvArUy2dJ5n36P2bl4xQlkjh0vCf0GvKvsxxzBHjIeayjLk5WoJ HwulDd7chsaqDiAiFZEhooM/vZarpVT1MLXXv7yc4WYleKqonootEzO5VJWsqGPMDc2v 7W9FAtLOvEW+5JNaomEEHSpxde0rpF9gRtphZUnk1xom16izZCUzxlWXaFmUUsMOmQV/ cUgQ== 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=wQ9by59LAdcIL3bSIKYDI9kndSMy8tWgVlnC5RbynYs=; b=KQDMClsHW9PI/jl0qEvafgr6yDookrTiinM4MjAafklG8OAR237ri9JYxm17ksgmV4 M47y3JbPlbuizTOgJ4SiUx1WWCdnxdpkK0hba1m7HBnL2ccIGwrVONfVyc7EoFSW93AG XD7x819h4XrRdSjs9M/6CzLXuAtrq2j51MMgzFpzv+TxbOaW4TdEMsz3iWqQ5IBb69iA 5V9ZA79Yt0rFRv1prCL4nk9WK9X7MFcUTSrvZ05E4Z5eJrUwjKMx5Bp/RHjJHZl+hEhK aPYOC0fSFpNXs28fBasRnnr8Efy2kffkkrXB7nnAo/5naK/tD1XHx8tAgLR3rEZY2bli nAPw== X-Gm-Message-State: AOAM532EMaZtcHvlH6wAdjZ6foJZI+MqaZQGs1qrARJbDVA5U096JVY3 TvzzAlNqP454Hp11FfRxk+s= X-Google-Smtp-Source: ABdhPJwFaB/JGlXT2+79VBkMVtisGqY3FGpuEbSmREXmKZgc98dtldXJpLHT6BqFvJKyHQjdOjcfTg== X-Received: by 2002:a17:906:2f07:: with SMTP id v7mr8391180eji.343.1612451960424; Thu, 04 Feb 2021 07:19:20 -0800 (PST) Received: from stitch.. ([80.71.140.73]) by smtp.gmail.com with ESMTPSA id a6sm2600001ejs.79.2021.02.04.07.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 07:19:19 -0800 (PST) From: Emil Renner Berthing To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 9/9] mmc: wbsd: Use new tasklet API Date: Thu, 4 Feb 2021 16:18:47 +0100 Message-Id: <20210204151847.91353-10-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_101922_060514_F2301422 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Emil Renner Berthing , Alex Dubov , Aaro Koskinen , linux-kernel@vger.kernel.org, Ulf Hansson , Jaehoon Chung , Ludovic Desroches , Ben Dooks , Manuel Lauss , Pierre Ossman , Bruce Chang , Harald Welte , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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/wbsd.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index cd63ea865b77..67ecd342fe5f 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -987,9 +987,9 @@ static inline struct mmc_data *wbsd_get_data(struct wbsd_host *host) return host->mrq->cmd->data; } -static void wbsd_tasklet_card(unsigned long param) +static void wbsd_tasklet_card(struct tasklet_struct *t) { - struct wbsd_host *host = (struct wbsd_host *)param; + struct wbsd_host *host = from_tasklet(host, t, card_tasklet); u8 csr; int delay = -1; @@ -1036,9 +1036,9 @@ static void wbsd_tasklet_card(unsigned long param) mmc_detect_change(host->mmc, msecs_to_jiffies(delay)); } -static void wbsd_tasklet_fifo(unsigned long param) +static void wbsd_tasklet_fifo(struct tasklet_struct *t) { - struct wbsd_host *host = (struct wbsd_host *)param; + struct wbsd_host *host = from_tasklet(host, t, fifo_tasklet); struct mmc_data *data; spin_lock(&host->lock); @@ -1067,9 +1067,9 @@ static void wbsd_tasklet_fifo(unsigned long param) spin_unlock(&host->lock); } -static void wbsd_tasklet_crc(unsigned long param) +static void wbsd_tasklet_crc(struct tasklet_struct *t) { - struct wbsd_host *host = (struct wbsd_host *)param; + struct wbsd_host *host = from_tasklet(host, t, crc_tasklet); struct mmc_data *data; spin_lock(&host->lock); @@ -1091,9 +1091,9 @@ static void wbsd_tasklet_crc(unsigned long param) spin_unlock(&host->lock); } -static void wbsd_tasklet_timeout(unsigned long param) +static void wbsd_tasklet_timeout(struct tasklet_struct *t) { - struct wbsd_host *host = (struct wbsd_host *)param; + struct wbsd_host *host = from_tasklet(host, t, timeout_tasklet); struct mmc_data *data; spin_lock(&host->lock); @@ -1115,9 +1115,9 @@ static void wbsd_tasklet_timeout(unsigned long param) spin_unlock(&host->lock); } -static void wbsd_tasklet_finish(unsigned long param) +static void wbsd_tasklet_finish(struct tasklet_struct *t) { - struct wbsd_host *host = (struct wbsd_host *)param; + struct wbsd_host *host = from_tasklet(host, t, finish_tasklet); struct mmc_data *data; spin_lock(&host->lock); @@ -1449,16 +1449,11 @@ static int wbsd_request_irq(struct wbsd_host *host, int irq) /* * Set up tasklets. Must be done before requesting interrupt. */ - tasklet_init(&host->card_tasklet, wbsd_tasklet_card, - (unsigned long)host); - tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo, - (unsigned long)host); - tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc, - (unsigned long)host); - tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout, - (unsigned long)host); - tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, - (unsigned long)host); + tasklet_setup(&host->card_tasklet, wbsd_tasklet_card); + tasklet_setup(&host->fifo_tasklet, wbsd_tasklet_fifo); + tasklet_setup(&host->crc_tasklet, wbsd_tasklet_crc); + tasklet_setup(&host->timeout_tasklet, wbsd_tasklet_timeout); + tasklet_setup(&host->finish_tasklet, wbsd_tasklet_finish); /* * Allocate interrupt.