Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1204976pxb; Thu, 4 Feb 2021 07:26:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7m5ZiU5dPesqGXO77Wl6UM2zxW251/NPB/QFYEKc1qwyDGZ7d9Tz0jR6Kw3jkIZV27YWG X-Received: by 2002:a05:6402:4ce:: with SMTP id n14mr8354311edw.309.1612452385621; Thu, 04 Feb 2021 07:26:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612452385; cv=none; d=google.com; s=arc-20160816; b=LpLJAPmrAJAboqvUcV9pCCPCoWTSWvZjhXEOXFzOMuzjSisPQW12bsm5BDTIMmHts0 21/RHUZfcG6DDMhcGBghfX/xZ7Nf2y7szagRH1NlxBbTirvq6WJ94mdoqz1TLt1fTBk/ Ag2SnJjCW8a+Vm/pVlIUZKRCHIOwezHae6rx8eG3faxxaigU/cHlKtm7OFV0GCnpC+Zf bA/RpQQ9Z/RWTCz7O6ia1Rya7+1UbwGGdt4y82cqrH01E/bFsmeaUzg+WVwLf/etVQEg wUVH7l9hyv5TUCAZrWpIlp37bREkx7umgKfO/zNYdyxfKURNwj2jhyi2ZnMYw9YfV8hp yb5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=wQ9by59LAdcIL3bSIKYDI9kndSMy8tWgVlnC5RbynYs=; b=YC9eF1MNVAwAs0fnIix9L9ai23L7VW/l8xymG40cS+sbICq/942wtPirOP1wtIUqVt /88/vK0iZC2Aeld4T2ErrFDDp+TZfpDuYoEM60rapTBom+VHxBiZBQhwEPob9ecOhVwa dhu/qT7c8P8FpXfdPst+SPc1QY0fJjVFJXyk/6qhQYiwYUooXBqkEOAn0SwSCG7ItASe nXYc6LBCBjShIiXj4OMUpa43AHHSHYK0iZLLmJRpqU9gwJ+ww5rlHaWR/TfY/b6hXr9U jogvUyYE3TF0JvyPU+saWodeX1lRCC/CSilqPaMALrfLcj/dFLFVwX3OeX3YiWQmVLaQ V3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=opVvsoKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si3366758ejt.485.2021.02.04.07.26.00; Thu, 04 Feb 2021 07:26:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=opVvsoKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237245AbhBDPYB (ORCPT + 99 others); Thu, 4 Feb 2021 10:24:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237198AbhBDPVH (ORCPT ); Thu, 4 Feb 2021 10:21:07 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A450C0617A7; Thu, 4 Feb 2021 07:19:21 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id p20so5939071ejb.6; 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=CvIK5z9i1xPm7XgBkeuSiGJQcl8KlFIwBqs/6Dk+TstdPbFR/R+oX+iI7AWEFqPMFe m8xznWERN+4rJBHNGp2eLmndv9RFpfz7o+apDV82khOJDwB26vcm4fCExoyWM8f16L/A C+oSbrNhOhV+MUTBx/atImL0WQVIIiIA71oOLH4A79Nh/96PhHc1EiFkKVPHTWkCY/xL 06bSugXIp/vDvf76Fgk7H3XUQeBBm8xNHgRjFKVl6GnV6Ztj7tf9Au1RH+ZpleiP8p4A 84sEXBg5QhevOwH70UDmnUreBFdmwdM/dyi9TCuEQBG7lJpRPQpS7nYt1bD+8aN5GGxS XiUw== X-Gm-Message-State: AOAM531s1D+M6YJjBZMs54Ap7qTUwFpSxE74/m1fnhmO8DFQeKRTsOZn uZJdgd1/Mr1Z+zAguMbmrAN99vo/qEOHWVzc 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) 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 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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/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. -- 2.30.0