drivers/watchdog: Make references to driver_api const.

Change-Id: I2c0d21329b9216e5b7bedbdd6dadee19b7f827fa
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
Marcus Shawcroft 2016-10-22 09:54:53 +01:00 committed by Anas Nashif
parent 6d0a0ab337
commit 156eebe912

View file

@ -84,43 +84,38 @@ struct wdt_driver_api {
static inline void wdt_enable(struct device *dev)
{
struct wdt_driver_api *api;
const struct wdt_driver_api *api = dev->driver_api;
api = (struct wdt_driver_api *)dev->driver_api;
api->enable(dev);
}
static inline void wdt_disable(struct device *dev)
{
struct wdt_driver_api *api;
const struct wdt_driver_api *api = dev->driver_api;
api = (struct wdt_driver_api *)dev->driver_api;
api->disable(dev);
}
static inline void wdt_get_config(struct device *dev,
struct wdt_config *config)
{
struct wdt_driver_api *api;
const struct wdt_driver_api *api = dev->driver_api;
api = (struct wdt_driver_api *)dev->driver_api;
api->get_config(dev, config);
}
static inline int wdt_set_config(struct device *dev,
struct wdt_config *config)
{
struct wdt_driver_api *api;
const struct wdt_driver_api *api = dev->driver_api;
api = (struct wdt_driver_api *)dev->driver_api;
return api->set_config(dev, config);
}
static inline void wdt_reload(struct device *dev)
{
struct wdt_driver_api *api;
const struct wdt_driver_api *api = dev->driver_api;
api = (struct wdt_driver_api *)dev->driver_api;
api->reload(dev);
}