drivers/pinmux: Make references to driver_api const
Change-Id: Ifc5ee93db7631bbe7c900666b5d83bf80facf9fb Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
parent
5e1e3edee6
commit
07b56d8545
|
@ -84,9 +84,8 @@ static inline int pinmux_pin_set(struct device *dev,
|
|||
uint32_t pin,
|
||||
uint32_t func)
|
||||
{
|
||||
struct pinmux_driver_api *api;
|
||||
const struct pinmux_driver_api *api = dev->driver_api;
|
||||
|
||||
api = (struct pinmux_driver_api *) dev->driver_api;
|
||||
return api->set(dev, pin, func);
|
||||
}
|
||||
|
||||
|
@ -94,9 +93,8 @@ static inline int pinmux_pin_get(struct device *dev,
|
|||
uint32_t pin,
|
||||
uint32_t *func)
|
||||
{
|
||||
struct pinmux_driver_api *api;
|
||||
const struct pinmux_driver_api *api = dev->driver_api;
|
||||
|
||||
api = (struct pinmux_driver_api *) dev->driver_api;
|
||||
return api->get(dev, pin, func);
|
||||
}
|
||||
|
||||
|
@ -104,9 +102,8 @@ static inline int pinmux_pin_pullup(struct device *dev,
|
|||
uint32_t pin,
|
||||
uint8_t func)
|
||||
{
|
||||
struct pinmux_driver_api *api;
|
||||
const struct pinmux_driver_api *api = dev->driver_api;
|
||||
|
||||
api = (struct pinmux_driver_api *) dev->driver_api;
|
||||
return api->pullup(dev, pin, func);
|
||||
}
|
||||
|
||||
|
@ -114,9 +111,8 @@ static inline int pinmux_pin_input_enable(struct device *dev,
|
|||
uint32_t pin,
|
||||
uint8_t func)
|
||||
{
|
||||
struct pinmux_driver_api *api;
|
||||
const struct pinmux_driver_api *api = dev->driver_api;
|
||||
|
||||
api = (struct pinmux_driver_api *) dev->driver_api;
|
||||
return api->input(dev, pin, func);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue