treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
@@ -272,7 +272,7 @@ static void usba_init_debugfs(struct usba_udc *udc)
|
||||
|
||||
regs_resource = platform_get_resource(udc->pdev, IORESOURCE_MEM,
|
||||
CTRL_IOMEM_ID);
|
||||
regs->d_inode->i_size = regs_resource->end - regs_resource->start + 1;
|
||||
regs->d_inode->i_size = resource_size(regs_resource);
|
||||
udc->debugfs_regs = regs;
|
||||
|
||||
usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0));
|
||||
|
Reference in New Issue
Block a user