@@ -229,7 +229,7 @@ static inline unsigned long resource_ext_type(const struct resource *res)
229
229
return res -> flags & IORESOURCE_EXT_TYPE_BITS ;
230
230
}
231
231
/* True iff r1 completely contains r2 */
232
- static inline bool resource_contains (struct resource * r1 , struct resource * r2 )
232
+ static inline bool resource_contains (const struct resource * r1 , const struct resource * r2 )
233
233
{
234
234
if (resource_type (r1 ) != resource_type (r2 ))
235
235
return false;
@@ -239,13 +239,13 @@ static inline bool resource_contains(struct resource *r1, struct resource *r2)
239
239
}
240
240
241
241
/* True if any part of r1 overlaps r2 */
242
- static inline bool resource_overlaps (struct resource * r1 , struct resource * r2 )
242
+ static inline bool resource_overlaps (const struct resource * r1 , const struct resource * r2 )
243
243
{
244
244
return r1 -> start <= r2 -> end && r1 -> end >= r2 -> start ;
245
245
}
246
246
247
- static inline bool
248
- resource_intersection ( struct resource * r1 , struct resource * r2 , struct resource * r )
247
+ static inline bool resource_intersection ( const struct resource * r1 , const struct resource * r2 ,
248
+ struct resource * r )
249
249
{
250
250
if (!resource_overlaps (r1 , r2 ))
251
251
return false;
@@ -254,8 +254,8 @@ resource_intersection(struct resource *r1, struct resource *r2, struct resource
254
254
return true;
255
255
}
256
256
257
- static inline bool
258
- resource_union ( struct resource * r1 , struct resource * r2 , struct resource * r )
257
+ static inline bool resource_union ( const struct resource * r1 , const struct resource * r2 ,
258
+ struct resource * r )
259
259
{
260
260
if (!resource_overlaps (r1 , r2 ))
261
261
return false;
0 commit comments