From patchwork Sat Jul 2 08:30:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaktipriya Shridhar X-Patchwork-Id: 9210743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6616D60890 for ; Sat, 2 Jul 2016 08:31:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5756B286D8 for ; Sat, 2 Jul 2016 08:31:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45109286C7; Sat, 2 Jul 2016 08:31:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE888286CE for ; Sat, 2 Jul 2016 08:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751212AbcGBIbD (ORCPT ); Sat, 2 Jul 2016 04:31:03 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:32784 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbcGBIbA (ORCPT ); Sat, 2 Jul 2016 04:31:00 -0400 Received: by mail-pa0-f67.google.com with SMTP id ts6so11550061pac.0; Sat, 02 Jul 2016 01:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=4SC8qtunWOM5Mixt17pFgvlq7/iAdtQggVYCZwjRIvM=; b=b44KpflysGfvWcRFUxYZSC/E4NGmFDh2+RasRJsmluvc8FXFzCRPLFvI15iu27d2QR otS0WSa1x+0nCIscFQEWnGL6t8G0kYn96ApglKb9WfpOFZ+EtiQgCkyMQ6VyB04294Bj hDz3pHv7qgOZj0/y2qBtww/21MIeUjLM5AiNRFiNNqwFsg4JJrBrtPg5kTf2C1zHHrfq lZc1VdiBS3tHT/o9XJoF3f8yfdRpoQuo6rAYi25nBUkjAaoBv5K5tLbKnChVQlg9UDcG OlFnW4rKguzdpj6+QCRBdA/0YcJ6HKgz6Z5ySUWrbbSHSWQ852j+Kfr+WKt+pRgN2p5S UT+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=4SC8qtunWOM5Mixt17pFgvlq7/iAdtQggVYCZwjRIvM=; b=l0tBDtjLr+RJ2aosXnnehsXdh1QWW3YSCFiZ9QPPLWYb5wyDXplg9fCGX4H4vyL/lp ODusXuGiVmvBoI0TSOXxJHJxin8Ymn9d3Bml1cwBuTfOf4IVcwxd8xmxIAy6Y96GXdFF DCCFlrYtsfkxQqWmnKgZGhkFt4/r4QYcWUR5pNblwN/x0eBYdfLy2V6hsTTt73tggipf nwUvrrmWs0m83v5vgnTxxJt0oUNa1TqwL0l5TNDepZeBy64LmErHz3dWNPmK7YZgi/SV w/qUx9RSXugaSNBGmoHmn2lHjLr1CF4Xky2EIngNYyn5F/9TZnYcRMGjPEKzPr7KhQUe vQkA== X-Gm-Message-State: ALyK8tKhEDpIC0FWjy2n1V9CD+Uol+7qI/SHgRdbwFyRO8irtI8UTbwfGliPg9nKhHZ5zg== X-Received: by 10.66.222.168 with SMTP id qn8mr4189326pac.141.1467448259636; Sat, 02 Jul 2016 01:30:59 -0700 (PDT) Received: from Karyakshetra ([2401:fa00:c:fd01:410d:2f25:536:9c8f]) by smtp.gmail.com with ESMTPSA id p187sm2805786pfg.67.2016.07.02.01.30.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Jul 2016 01:30:59 -0700 (PDT) Date: Sat, 2 Jul 2016 14:00:56 +0530 From: Bhaktipriya Shridhar To: Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Oleg Nesterov , Andrew Morton Cc: Tejun Heo , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] omapfb: omapfb-main: Remove deprecated create_singlethread_workqueue Message-ID: <20160702083056.GA26936@Karyakshetra> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The workqueue auto_update_work is involved in auto updating mode for manual-update displays. omapfb driver uses a delayed work item to update the display at a constant rate. Since these long-running work items aren't involved in memory reclaim in any way, system_long_wq has been used. Work item has been sync cancelled in omapfb_stop_auto_update() which gets called in omapfb_free_resources() to ensure that nothing is pending when the driver is disconnected. Signed-off-by: Bhaktipriya Shridhar --- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 23 +---------------------- drivers/video/fbdev/omap2/omapfb/omapfb.h | 1 - 2 files changed, 1 insertion(+), 23 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index d3af01c..5c6eec7 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c @@ -1693,8 +1693,7 @@ static void omapfb_auto_update_work(struct work_struct *work) freq = auto_update_freq; if (freq == 0) freq = 20; - queue_delayed_work(fbdev->auto_update_wq, - &d->auto_update_work, HZ / freq); + queue_delayed_work(system_long_wq, &d->auto_update_work, HZ / freq); } void omapfb_start_auto_update(struct omapfb2_device *fbdev, @@ -1702,20 +1701,6 @@ void omapfb_start_auto_update(struct omapfb2_device *fbdev, { struct omapfb_display_data *d; - if (fbdev->auto_update_wq == NULL) { - struct workqueue_struct *wq; - - wq = create_singlethread_workqueue("omapfb_auto_update"); - - if (wq == NULL) { - dev_err(fbdev->dev, "Failed to create workqueue for " - "auto-update\n"); - return; - } - - fbdev->auto_update_wq = wq; - } - d = get_display_data(fbdev, display); INIT_DELAYED_WORK(&d->auto_update_work, omapfb_auto_update_work); @@ -1867,12 +1852,6 @@ static void omapfb_free_resources(struct omapfb2_device *fbdev) omap_dss_put_device(dssdev); } - if (fbdev->auto_update_wq != NULL) { - flush_workqueue(fbdev->auto_update_wq); - destroy_workqueue(fbdev->auto_update_wq); - fbdev->auto_update_wq = NULL; - } - dev_set_drvdata(fbdev->dev, NULL); } diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index 623cd87..ff0cf79 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h @@ -106,7 +106,6 @@ struct omapfb2_device { unsigned num_managers; struct omap_overlay_manager *managers[10]; - struct workqueue_struct *auto_update_wq; }; struct omapfb_colormode {