Commit ad7ed061 authored by Alessandro Rubini's avatar Alessandro Rubini

kernel modules: fix wr_nic address setup code

parent 53e2b3f0
......@@ -74,6 +74,8 @@ static int __devinit __wrn_map_resources(struct platform_device *pdev)
* We don't populate the whole array, but use the resource list
*/
while ( (res =platform_get_resource(pdev, IORESOURCE_MEM, i)) ) {
if (!res->start)
continue;
ptr = ioremap(res->start, res->end + 1 - res->start);
if (!ptr) {
dev_err(&pdev->dev, "Remap for res %i (%08x) failed\n",
......
......@@ -31,10 +31,10 @@ static struct wrn_dev wrn_dev;
/* Not all the blocks are relevant to this driver, only list the used ones */
static struct resource wrn_resources[] = {
__RES( NIC ),
__RES( EP ),
__RES( TS ),
__RES( PPSG ),
[WRN_FB_NIC] = __RES( NIC ),
[WRN_FB_EP] = __RES( EP ),
[WRN_FB_TS] = __RES( TS ),
[WRN_FB_PPSG] = __RES( PPSG ),
};
#undef __RES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment