diff mbox

net: emaclite: include linux/of_irq.h

Message ID 2244203.EL457oABTU@wuerfel
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Arnd Bergmann June 3, 2013, 9:39 p.m. UTC
The emaclite driver now calls of_irq_to_resource, which is
declared in linux/of_irq.h. Without this patch, I get a build
error on ARM.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Michal Simek <michal.simek@xilinx.com>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Michal Simek June 4, 2013, 8:21 a.m. UTC | #1
On 06/03/2013 11:39 PM, Arnd Bergmann wrote:
> The emaclite driver now calls of_irq_to_resource, which is
> declared in linux/of_irq.h. Without this patch, I get a build
> error on ARM.

What about to just change it to use platform_get_resource()?
I will test it.

Thanks,
Michal
Arnd Bergmann June 4, 2013, 8:44 a.m. UTC | #2
On Tuesday 04 June 2013 10:21:01 Michal Simek wrote:
> On 06/03/2013 11:39 PM, Arnd Bergmann wrote:
> > The emaclite driver now calls of_irq_to_resource, which is
> > declared in linux/of_irq.h. Without this patch, I get a build
> > error on ARM.
> 
> What about to just change it to use platform_get_resource()?
> I will test it.

Yes, that would work too. It seems the driver predates the automatic
generation of resources for IRQs and MMIO registers.

If you change the IRQ resource to platform_get_resource, you should
change the other one as well.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Simek June 4, 2013, 8:46 a.m. UTC | #3
On 06/04/2013 10:44 AM, Arnd Bergmann wrote:
> On Tuesday 04 June 2013 10:21:01 Michal Simek wrote:
>> On 06/03/2013 11:39 PM, Arnd Bergmann wrote:
>>> The emaclite driver now calls of_irq_to_resource, which is
>>> declared in linux/of_irq.h. Without this patch, I get a build
>>> error on ARM.
>>
>> What about to just change it to use platform_get_resource()?
>> I will test it.
> 
> Yes, that would work too. It seems the driver predates the automatic
> generation of resources for IRQs and MMIO registers.
> 
> If you change the IRQ resource to platform_get_resource, you should
> change the other one as well.

Yep. I have done that changes. Let me test them on real hw
and I will send them soon.

Thanks,
Michal
diff mbox

Patch

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index aa14d8a..9559a3d 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -22,6 +22,7 @@ 
 #include <linux/slab.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/of_mdio.h>
 #include <linux/of_net.h>