.. | .. |
---|
118 | 118 | MODULE_DEVICE_TABLE(of, omap_control_usb_id_table); |
---|
119 | 119 | |
---|
120 | 120 | static struct platform_driver am335x_control_driver; |
---|
121 | | -static int match(struct device *dev, void *data) |
---|
| 121 | +static int match(struct device *dev, const void *data) |
---|
122 | 122 | { |
---|
123 | | - struct device_node *node = (struct device_node *)data; |
---|
| 123 | + const struct device_node *node = (const struct device_node *)data; |
---|
124 | 124 | return dev->of_node == node && |
---|
125 | 125 | dev->driver == &am335x_control_driver.driver; |
---|
126 | 126 | } |
---|
.. | .. |
---|
149 | 149 | |
---|
150 | 150 | static int am335x_control_usb_probe(struct platform_device *pdev) |
---|
151 | 151 | { |
---|
152 | | - struct resource *res; |
---|
153 | 152 | struct am335x_control_usb *ctrl_usb; |
---|
154 | 153 | const struct of_device_id *of_id; |
---|
155 | 154 | const struct phy_control *phy_ctrl; |
---|
.. | .. |
---|
166 | 165 | |
---|
167 | 166 | ctrl_usb->dev = &pdev->dev; |
---|
168 | 167 | |
---|
169 | | - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl"); |
---|
170 | | - ctrl_usb->phy_reg = devm_ioremap_resource(&pdev->dev, res); |
---|
| 168 | + ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); |
---|
171 | 169 | if (IS_ERR(ctrl_usb->phy_reg)) |
---|
172 | 170 | return PTR_ERR(ctrl_usb->phy_reg); |
---|
173 | 171 | |
---|
174 | | - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wakeup"); |
---|
175 | | - ctrl_usb->wkup = devm_ioremap_resource(&pdev->dev, res); |
---|
| 172 | + ctrl_usb->wkup = devm_platform_ioremap_resource_byname(pdev, "wakeup"); |
---|
176 | 173 | if (IS_ERR(ctrl_usb->wkup)) |
---|
177 | 174 | return PTR_ERR(ctrl_usb->wkup); |
---|
178 | 175 | |
---|