From patchwork Sat Dec 11 16:51:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 75199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pv0-f184.google.com (mail-pv0-f184.google.com [74.125.83.184]) by ozlabs.org (Postfix) with ESMTP id 55E55B70A9 for ; Sun, 12 Dec 2010 03:52:03 +1100 (EST) Received: by pvg11 with SMTP id 11sf1462424pvg.11 for ; Sat, 11 Dec 2010 08:52:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:x-virus-status :x-virus-scanned:received:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references:x-spam-status :x-spam-checker-version:x-greylist:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=efZ2hGPsqcfXkDQZ/RWSY9YGfV1/HPl3gAFtudU/tFo=; b=oC4eYepFEsEKExdXf1Ju1aZmX/neyyKTbc5kdmP5I9SNnvpSlNt47+hL1z182DPJMm wvw7uuFV+bexghGTrMfwrzjW5vFZ8RV1A+uffcGzr51Q2hjhbEwavmtag/O1ewbcUm9F bl2WXHD4keoLuQ7rXKdBpccVjtFb75iuk5vRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:x-virus-status :x-virus-scanned:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-spam-status:x-spam-checker-version :x-greylist:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; b=efkMKWUKv9mJRLe087wZG7rONvrXYyioUuOFjv7FTLrHmF8Ydh497KYYxV55IYrW1C KVfx+Rlu2mOEpBOVHPa2gj6+Er/iQ7B+5d4foR6XzgUuQRuoJBuee7oO3YrubwRykRj+ a+7aFfelGfH0Xvpiu/762owaRco1/GD1HmsJ4= Received: by 10.142.65.9 with SMTP id n9mr100044wfa.14.1292086321118; Sat, 11 Dec 2010 08:52:01 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.142.2.41 with SMTP id 41ls5363524wfb.0.p; Sat, 11 Dec 2010 08:52:00 -0800 (PST) Received: by 10.142.136.18 with SMTP id j18mr1554376wfd.24.1292086320559; Sat, 11 Dec 2010 08:52:00 -0800 (PST) Received: by 10.142.136.18 with SMTP id j18mr1554375wfd.24.1292086320532; Sat, 11 Dec 2010 08:52:00 -0800 (PST) Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) by gmr-mx.google.com with ESMTP id n6si4824434wfl.3.2010.12.11.08.52.00; Sat, 11 Dec 2010 08:52:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of tj@kernel.org designates 140.211.167.34 as permitted sender) client-ip=140.211.167.34; Received: from htj.dyndns.org (localhost [127.0.0.1]) by hera.kernel.org (8.14.4/8.14.3) with ESMTP id oBBGpuX5018934; Sat, 11 Dec 2010 16:51:57 GMT X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.96.4 at hera.kernel.org Received: by htj.dyndns.org (Postfix, from userid 10000) id AE9781CFBC0C; Sat, 11 Dec 2010 17:51:52 +0100 (CET) From: Tejun Heo To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Alessandro Zummo , rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH 29/30] rtc: don't use flush_scheduled_work() Date: Sat, 11 Dec 2010 17:51:46 +0100 Message-Id: <1292086307-19211-30-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1292086307-19211-1-git-send-email-tj@kernel.org> References: <1292086307-19211-1-git-send-email-tj@kernel.org> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (hera.kernel.org [127.0.0.1]); Sat, 11 Dec 2010 16:52:00 +0000 (UTC) X-Original-Sender: tj@kernel.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of tj@kernel.org designates 140.211.167.34 as permitted sender) smtp.mail=tj@kernel.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , flush_scheduled_work() is deprecated and scheduled to be removed. On removal, directly cancel the work, and flush the uie_task in rtc-dev.c::clear_uie(). Signed-off-by: Tejun Heo Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com --- This is part of a series to remove flush_scheduled_work() usage to prepare for deprecation of flush_scheduled_work(). Patches in this series are self contained and mostly straight-forward. Please feel free to take it into the appropriate tree, or just ack it. In the latter case, I'll merge the patch through the workqueue tree during the next merge window. If you're seeing this patch for the second time, it's because the commit hasn't showed up in mainline yet. Please let me know what should be done. Thank you. drivers/rtc/rtc-dev.c | 2 +- drivers/rtc/rtc-ds1305.c | 2 +- drivers/rtc/rtc-ds1374.c | 2 +- drivers/rtc/rtc-ds3232.c | 2 +- drivers/rtc/rtc-rx8025.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 62227cd..0cc0984 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -104,7 +104,7 @@ static int clear_uie(struct rtc_device *rtc) } if (rtc->uie_task_active) { spin_unlock_irq(&rtc->irq_lock); - flush_scheduled_work(); + flush_work_sync(&rtc->uie_task); spin_lock_irq(&rtc->irq_lock); } rtc->uie_irq_active = 0; diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 48da85e..077af1d 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c @@ -813,7 +813,7 @@ static int __devexit ds1305_remove(struct spi_device *spi) if (spi->irq) { set_bit(FLAG_EXITING, &ds1305->flags); free_irq(spi->irq, ds1305); - flush_scheduled_work(); + cancel_work_sync(&ds1305->work); } rtc_device_unregister(ds1305->rtc); diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 1f0007f..47fb635 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c @@ -417,7 +417,7 @@ static int __devexit ds1374_remove(struct i2c_client *client) mutex_unlock(&ds1374->mutex); free_irq(client->irq, client); - flush_scheduled_work(); + cancel_work_sync(&ds1374->work); } rtc_device_unregister(ds1374->rtc); diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 5706355..23a9ee1 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -463,7 +463,7 @@ static int __devexit ds3232_remove(struct i2c_client *client) mutex_unlock(&ds3232->mutex); free_irq(client->irq, client); - flush_scheduled_work(); + cancel_work_sync(&ds3232->work); } rtc_device_unregister(ds3232->rtc); diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index 1146e35..af32a62 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c @@ -650,7 +650,7 @@ static int __devexit rx8025_remove(struct i2c_client *client) mutex_unlock(lock); free_irq(client->irq, client); - flush_scheduled_work(); + cancel_work_sync(&rx8025->work); } rx8025_sysfs_unregister(&client->dev);