From patchwork Mon Jan 3 13:49:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 448041 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p03DuOKO029524 for ; Mon, 3 Jan 2011 13:56:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932186Ab1ACNzz (ORCPT ); Mon, 3 Jan 2011 08:55:55 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:36659 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755163Ab1ACNuZ (ORCPT ); Mon, 3 Jan 2011 08:50:25 -0500 Received: by mail-bw0-f46.google.com with SMTP id 15so13706072bwz.19 for ; Mon, 03 Jan 2011 05:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=Q7492gHjddtHMM7jzKFDlr10npGvFIz9ollvF2vRMSE=; b=O9IcYiNPuZvhCR8hlPIaw2d/bHdjruI1G0H8z10ppFwO1bX8yC+r4b1rhiLNOd2pm/ rejkxK584/SC6QGaKPYTpbBRXhy8NN9OGcKnrfLbnaT//H93AYxwX5Vm0TCAWgn6+ZoO ZSAsP+G56n4MqNGFuci91lWB8ueXQEgjqqZYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=xX13Yax1Cv40fDOWGjMKJpQf37kfZXJgpaPHoykAfPXfuuMhrjI2IlHTRddRr6iTHi XKp5l8TkrEAvIkRx0PgsnmpWkOYZWzw919x/Zibsa4Jh6Ts8v5sXlaQSL8FxmgVG82gA 8sqAJ7kLDUUJ2QNMk1tKUYF+9CWM09koHy66Y= Received: by 10.204.85.11 with SMTP id m11mr9014632bkl.115.1294062624060; Mon, 03 Jan 2011 05:50:24 -0800 (PST) Received: from localhost.localdomain ([130.75.117.88]) by mx.google.com with ESMTPS id f20sm9026594bkf.4.2011.01.03.05.50.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 05:50:23 -0800 (PST) From: Tejun Heo To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Dmitry Torokhov , linux-input@vger.kernel.org, Dan Carpenter , Todd Fischer Subject: [PATCH 10/32] input/tps6507x-ts: use system_wq instead of dedicated workqueue Date: Mon, 3 Jan 2011 14:49:33 +0100 Message-Id: <1294062595-30097-11-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1294062595-30097-1-git-send-email-tj@kernel.org> References: <1294062595-30097-1-git-send-email-tj@kernel.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 13:56:25 +0000 (UTC) diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index c8c136c..4303149 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -43,7 +43,6 @@ struct tps6507x_ts { struct input_dev *input_dev; struct device *dev; char phys[32]; - struct workqueue_struct *wq; struct delayed_work work; unsigned polling; /* polling is active */ struct ts_event tc; @@ -220,8 +219,8 @@ done: poll = 1; if (poll) { - schd = queue_delayed_work(tsc->wq, &tsc->work, - msecs_to_jiffies(tsc->poll_period)); + schd = schedule_delayed_work(&tsc->work, + msecs_to_jiffies(tsc->poll_period)); if (schd) tsc->polling = 1; else { @@ -303,7 +302,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev) tsc->input_dev = input_dev; INIT_DELAYED_WORK(&tsc->work, tps6507x_ts_handler); - tsc->wq = create_workqueue("TPS6507x Touchscreen"); if (init_data) { tsc->poll_period = init_data->poll_period; @@ -325,8 +323,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) if (error) goto err2; - schd = queue_delayed_work(tsc->wq, &tsc->work, - msecs_to_jiffies(tsc->poll_period)); + schd = schedule_delayed_work(&tsc->work, + msecs_to_jiffies(tsc->poll_period)); if (schd) tsc->polling = 1; @@ -341,7 +339,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev) err2: cancel_delayed_work_sync(&tsc->work); - destroy_workqueue(tsc->wq); input_free_device(input_dev); err1: kfree(tsc); @@ -357,7 +354,6 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev) struct input_dev *input_dev = tsc->input_dev; cancel_delayed_work_sync(&tsc->work); - destroy_workqueue(tsc->wq); input_unregister_device(input_dev);