File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
117
117
int i ;
118
118
119
119
for (i = 0 ; i < bridge -> num_resources ; i ++ ) {
120
- struct resource * r = & bridge -> resource [i ];
121
-
122
- if (zorro_resource_start (z ) >= r -> start &&
123
- zorro_resource_end (z ) <= r -> end )
124
- return r ;
120
+ if (resource_contains (& bridge -> resource [i ], & z -> resource ))
121
+ return & bridge -> resource [i ];
125
122
}
123
+
126
124
return & iomem_resource ;
127
125
}
128
126
129
-
130
-
131
127
static int __init amiga_zorro_probe (struct platform_device * pdev )
132
128
{
133
129
struct zorro_bus * bus ;
@@ -176,9 +172,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
176
172
z -> slotsize = zi -> slotsize ;
177
173
sprintf (z -> name , "Zorro device %08x" , z -> id );
178
174
zorro_name_device (z );
179
- z -> resource .start = zi -> boardaddr ;
180
- z -> resource .end = zi -> boardaddr + zi -> boardsize - 1 ;
181
- z -> resource .name = z -> name ;
175
+ z -> resource = DEFINE_RES_MEM_NAMED (zi -> boardaddr , zi -> boardsize , z -> name );
182
176
r = zorro_find_parent_resource (pdev , z );
183
177
error = request_resource (r , & z -> resource );
184
178
if (error && !(z -> rom .er_Type & ERTF_MEMLIST ))
You can’t perform that action at this time.
0 commit comments