History

devres: allow const resource arguments

devm_ioremap_resource() does not currently take 'const' arguments, which results in a warning from the first driver trying to do it anyway: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ Change the prototype to allow it, as there is no real reason not to.

Arnd Bergmann committed 7 years ago

Commit eef778c1 parent dffcac22 files · +4 −2Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/device.h+2−1
@@ -704,7 +704,8 @@ extern unsigned long devm_get_free_pages(struct device *dev, · 703 unmodified lines
704 gfp_t gfp_mask, unsigned int order);704 gfp_t gfp_mask, unsigned int order);
705extern void devm_free_pages(struct device *dev, unsigned long addr);705extern void devm_free_pages(struct device *dev, unsigned long addr);
706 706
707void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);707void __iomem *devm_ioremap_resource(struct device *dev,
708 const struct resource *res);
708 709
709void __iomem *devm_of_iomap(struct device *dev,710void __iomem *devm_of_iomap(struct device *dev,
710 struct device_node *node, int index,711 struct device_node *node, int index,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t