Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379Ab0KXQWc (ORCPT ); Wed, 24 Nov 2010 11:22:32 -0500 Received: from gate.lvk.cs.msu.su ([158.250.17.1]:44232 "EHLO mail.lvk.cs.msu.su" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753697Ab0KXQWb (ORCPT ); Wed, 24 Nov 2010 11:22:31 -0500 X-Spam-ASN: From: Alexander Gordeev To: linux-kernel@vger.kernel.org Cc: "Nikita V\. Youshchenko" , linuxpps@ml.enneenne.com, Rodolfo Giometti , Alexander Gordeev Subject: [PATCHv5 09/17] pps: do not disable interrupts for idr operations Date: Wed, 24 Nov 2010 19:15:47 +0300 Message-Id: <7d80c35f628a85c7db2123eca5794aea8e9a92e7.1290599845.git.lasaine@lvk.cs.msu.su> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: References: X-AV-Checked: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1624 Lines: 56 Now pps_idr_lock is never used in interrupt context so replace spin_lock_irq/spin_unlock_irq with plain spin_lock/spin_unlock. Signed-off-by: Alexander Gordeev --- drivers/pps/pps.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index 79b4455..54964a5 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c @@ -239,9 +239,9 @@ static void pps_device_destruct(struct device *dev) /* release id here to protect others from using it while it's * still in use */ - spin_lock_irq(&pps_idr_lock); + spin_lock(&pps_idr_lock); idr_remove(&pps_idr, pps->id); - spin_unlock_irq(&pps_idr_lock); + spin_unlock(&pps_idr_lock); kfree(dev); kfree(pps); @@ -260,9 +260,9 @@ int pps_register_cdev(struct pps_device *pps) * After idr_get_new() calling the new source will be freely available * into the kernel. */ - spin_lock_irq(&pps_idr_lock); + spin_lock(&pps_idr_lock); err = idr_get_new(&pps_idr, pps, &pps->id); - spin_unlock_irq(&pps_idr_lock); + spin_unlock(&pps_idr_lock); if (err < 0) return err; @@ -302,9 +302,9 @@ del_cdev: cdev_del(&pps->cdev); free_idr: - spin_lock_irq(&pps_idr_lock); + spin_lock(&pps_idr_lock); idr_remove(&pps_idr, pps->id); - spin_unlock_irq(&pps_idr_lock); + spin_unlock(&pps_idr_lock); return err; } -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/