From patchwork Thu Nov 10 16:28:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 124959 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D4DD85E65B for ; Fri, 11 Nov 2011 03:29:08 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934243Ab1KJQ3H (ORCPT ); Thu, 10 Nov 2011 11:29:07 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:48477 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932822Ab1KJQ3F (ORCPT ); Thu, 10 Nov 2011 11:29:05 -0500 Received: by wyh15 with SMTP id 15so2898886wyh.19 for ; Thu, 10 Nov 2011 08:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R2sSCuSGMR6OKj6T1zSykrelaxNjcyqGnsaXjyzIIkI=; b=SKeDaakxOVCc1ulkhhldngNy1v7BuYsO2J3HDoCyDlWIu4t6e/RUPmwvIQKZi3a8Yx 6gUpi+wfshjjNi3OVyuImSbivbFm5D3kWTHrmVjKCX/TpY7snpEy8vQsz19A6DO5OKen 2k0ZVvW5EYNNgBopmWp4XO2H6pnbE4P4/aQ1A= Received: by 10.216.160.208 with SMTP id u58mr1527320wek.27.1320942543673; Thu, 10 Nov 2011 08:29:03 -0800 (PST) Received: from localhost (mail.dev.rtsoft.ru. [213.79.90.226]) by mx.google.com with ESMTPS id ep16sm5499217wbb.21.2011.11.10.08.29.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Nov 2011 08:29:02 -0800 (PST) Date: Thu, 10 Nov 2011 20:28:59 +0400 From: Anton Vorontsov To: Alan Cox Cc: Ingo Molnar , Jeff Garzik , Grant Likely , Randy Dunlap , Stephen Rothwell , linux-next@vger.kernel.org, LKML , linux-ide@vger.kernel.org, Linus Torvalds , Andrew Morton , devicetree-discuss@lists.ozlabs.org Subject: [PATCH] ata: Don't use NO_IRQ in pata_of_platform driver Message-ID: <20111110162859.GA7088@oksana.dev.rtsoft.ru> References: <20111110151852.GA7465@oksana.dev.rtsoft.ru> <20111110152606.GB3207@oksana.dev.rtsoft.ru> <20111110153816.239af1d7@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20111110153816.239af1d7@lxorguk.ukuu.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Drivers should not use NO_IRQ; moreover, some architectures don't have it nowadays. '0' is the 'no irq' case. Signed-off-by: Anton Vorontsov Acked-by: Alan Cox --- On Thu, Nov 10, 2011 at 03:38:16PM +0000, Alan Cox wrote: > On Thu, 10 Nov 2011 19:26:06 +0400 > Anton Vorontsov wrote: > > > Drivers should not use NO_IRQ; moreover, some architectures don't > > have it nowadays. '0' is the 'no irq' case. > > > > Signed-off-by: Anton Vorontsov > > Acked-by: Alan Cox In case if we don't want a "band-aid fix" for 3.2, here is the patch that just does the proper fix (w/ a risk to break minor architectures). drivers/ata/pata_of_platform.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index a72ab0d..2a472c5 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c @@ -52,7 +52,7 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev) } ret = of_irq_to_resource(dn, 0, &irq_res); - if (ret == NO_IRQ) + if (!ret) irq_res.start = irq_res.end = 0; else irq_res.flags = 0;