From mboxrd@z Thu Jan 1 00:00:00 1970 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.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 18852C433DF for ; Mon, 17 Aug 2020 09:16:32 +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 D5EDF2072D for ; Mon, 17 Aug 2020 09:16:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FT3Mc1EG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PiVBIWKY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5EDF2072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=8BNQUTtLTTclcOF3LVdiiwMTByhpszR8/GyVmPhQAPo=; b=FT3Mc1EGG1VgikTYrEnweowCNI 6bCGEwK4iMCSUyhK5ORmqgaNxDzGDYuGzsYB+b89sqIGGNMo6j7it45KtoGlGrm/8O0PLmeUK3C7C OFIqakkJW8hpYE6ZLGVeFqX/6c4WiHyWuUW2oclVkq1EzI6H4cNgfZQ+Zv+lX3MUo65J4FTYsxHiY NdKRgrzSCK+RjWMxEyHp54tZNWDR/y87VwBxQFrf/g3aUk6DKnKKL7NUcjIn0mTr5K150IaXNYbkM 36RWEdcEdoYdQ/Tra11KpC7SMQyRjlsHBkA3uDwxaL/2OW81FMYwgllQzb1NAwz0PR+fJfi4j0Z7f v4xBqj1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7bDx-0002cs-Fk; Mon, 17 Aug 2020 09:14:37 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7azU-0003Pj-RD for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2020 08:59:43 +0000 Received: by mail-pj1-x1043.google.com with SMTP id mt12so7492637pjb.4 for ; Mon, 17 Aug 2020 01:59:40 -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=dprMDdtzRUqVhrLyliJzSuOBrFlLqstZsl9JNe0NSK4=; b=PiVBIWKYpZOwpl3l30M6Fo3rPU5nW0nfTubZQV7JUc+vV0A64yGrNLFdEjouXpaa5k Z5MoM3QXi9zN03azfYuFoEgScl5BTcR6CYvCRXQ0yUUkhjRyt2gbWOpjMrL8eEKGIAH/ t5PN9g3nz5jnInLj5+xhlgTaoAPzC1QEmRa/NN3HL8FR4C0cKFBl2OyupfYgLxWhk4qZ y6oV4Jn7ofsbDRM2qFptLzVp5oA/WPWcct7BDmWBh2FIlElullflHeaz9Rjp6X4myAn5 MJD3otw4Ijv/FhpK+p9x8q2mI9Vd1VRlhBf7SnAUps5VsK+hCda8WhTlrQ/B6j9SiBas 2ZAg== 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=dprMDdtzRUqVhrLyliJzSuOBrFlLqstZsl9JNe0NSK4=; b=YV2bmTXA01Vc56uF1WvH2BtrgX+Y7IF1Lf7RREUeo0CxvMwSiEscCrmslvkHFxHAhq SR1JBPe5Z7t3NIcXn9+kJQc/AikYt6O1ktKJPrl5ZQmC508cb31UosfzVQVPlMmx404U v+dAyvp1yqqScaiqPONrbHAWLXyhLb5/DYSmZeb4VYXB52VYTfLfEOyM04rOf8MlPg+9 gLxqThL/P2rJKcRdbtP80yir4gOaNsXJpddekdKUcBW2V6MtK9XzRTFvnW7S6txNSTXj JFjyF/ZGHExPfugDXJCplnESKyJ8NCiB2gSfvE2cxMPAU3PyeZe8ud7uFhnRcZuQyTIv F4/Q== X-Gm-Message-State: AOAM533GZPVLAphx782SsBM53W8SJeMpMqIZ19abK6P2HdkR7KmwsiUz ebhw7r6f3GqijBYjvFE9CSo= X-Google-Smtp-Source: ABdhPJyhdp9fjnJK79p+NpoPwon5bOwfZA4oyGKma49ni2x2sF9tVyQew0t66rGvuOPdfS5alrGOlg== X-Received: by 2002:a17:902:c154:: with SMTP id 20mr10665077plj.64.1597654778442; Mon, 17 Aug 2020 01:59:38 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id j13sm18508547pfn.166.2020.08.17.01.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:59:37 -0700 (PDT) From: Allen Pais To: richard.genoud@gmail.com, gregkh@linuxfoundation.org Subject: [PATCH 2/4] tty: atmel_serial: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:29:19 +0530 Message-Id: <20200817085921.26033-3-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817085921.26033-1-allen.cryptic@gmail.com> References: <20200817085921.26033-1-allen.cryptic@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_045941_053885_CD010C6D X-CRM114-Status: GOOD ( 15.08 ) 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: keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Romain Perier , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Allen Pais 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/tty/serial/atmel_serial.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index e43471b33710..a9c47f56e994 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -1722,10 +1722,11 @@ static int atmel_prepare_rx_pdc(struct uart_port *port) /* * tasklet handling tty stuff outside the interrupt handler. */ -static void atmel_tasklet_rx_func(unsigned long data) +static void atmel_tasklet_rx_func(struct tasklet_struct *t) { - struct uart_port *port = (struct uart_port *)data; - struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); + struct atmel_uart_port *atmel_port = from_tasklet(atmel_port, t, + tasklet_rx); + struct uart_port *port = &atmel_port->uart; /* The interrupt handler does not take the lock */ spin_lock(&port->lock); @@ -1733,10 +1734,11 @@ static void atmel_tasklet_rx_func(unsigned long data) spin_unlock(&port->lock); } -static void atmel_tasklet_tx_func(unsigned long data) +static void atmel_tasklet_tx_func(struct tasklet_struct *t) { - struct uart_port *port = (struct uart_port *)data; - struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); + struct atmel_uart_port *atmel_port = from_tasklet(atmel_port, t, + tasklet_tx); + struct uart_port *port = &atmel_port->uart; /* The interrupt handler does not take the lock */ spin_lock(&port->lock); @@ -1911,10 +1913,8 @@ static int atmel_startup(struct uart_port *port) } atomic_set(&atmel_port->tasklet_shutdown, 0); - tasklet_init(&atmel_port->tasklet_rx, atmel_tasklet_rx_func, - (unsigned long)port); - tasklet_init(&atmel_port->tasklet_tx, atmel_tasklet_tx_func, - (unsigned long)port); + tasklet_setup(&atmel_port->tasklet_rx, atmel_tasklet_rx_func); + tasklet_setup(&atmel_port->tasklet_tx, atmel_tasklet_tx_func); /* * Initialize DMA (if necessary) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel