From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Mon, 7 Nov 2011 14:51:57 -0800 Subject: [PATCH] arm: omap2+: hwmod: fix breakage introduced by d6504acd In-Reply-To: <20111107224129.GJ15294@n2100.arm.linux.org.uk> References: <1320688617-4543-1-git-send-email-balbi@ti.com> <20111107183208.GG15294@n2100.arm.linux.org.uk> <20111107193908.GA5059@legolas.emea.dhcp.ti.com> <20111107212707.GH15294@n2100.arm.linux.org.uk> <20111107224129.GJ15294@n2100.arm.linux.org.uk> Message-ID: <20111107225157.GB31337@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Russell King - ARM Linux [111107 14:06]: > On Mon, Nov 07, 2011 at 02:29:35PM -0700, Paul Walmsley wrote: > > On Mon, 7 Nov 2011, Russell King - ARM Linux wrote: > > > > > Again, can never have been tested on OMAP3. > > > > > > Does anyone apart from me bother doing any testing what so ever on OMAP3 > > > platforms? Am I the only one? > > > > This was fixed by > > > > http://www.spinics.net/lists/arm-kernel/msg143549.html > > > > which didn't go upstream as part of the v3.2 merge window. > > Ah, that patch. > > Which version of the patch does Tony have? The one you point at which > uses IS_ERR_VALUE() and I complained about, or the version that has that > fixed? Here's what I got. Looks like the removal of the sr[12]_hwmod part is no longer needed, so only the r value check part is needed. From: Paul Walmsley Date: Thu, 6 Oct 2011 14:39:28 -0600 Subject: [PATCH] ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list Commit d6504acd2125984c61dce24727dd3842d0144015 ("OMAP2+: hwmod: remove OMAP_CHIP*") tests the inverse condition of what it should be testing for the return value from omap_hwmod_register(). This causes several IP blocks to not be registered on several OMAP3 family devices. Fixing that bug also unmasked another bug, originally reported by Chase Maupin and then subsequently by Abhilash K V , which caused SmartReflex IP blocks to be registered on SoCs that don't support them. Thanks to Russell King - ARM Linux for comments on a previous version of the patch. Signed-off-by: Paul Walmsley Cc: Chase Maupin Cc: Abhilash K V Cc: Russell King - ARM Linux Signed-off-by: Tony Lindgren --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3270,7 +3270,7 @@ int __init omap3xxx_hwmod_init(void) /* Register hwmods common to all OMAP3 */ r = omap_hwmod_register(omap3xxx_hwmods); - if (!r) + if (r < 0) return r; rev = omap_rev(); @@ -3295,7 +3295,7 @@ int __init omap3xxx_hwmod_init(void) }; r = omap_hwmod_register(h); - if (!r) + if (r < 0) return r; /*