drivers/eth: Make references to driver_api const

Change-Id: I27f5ba316799aafabac4bbe1c93caa639a952684
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
Marcus Shawcroft 2016-10-22 09:59:53 +01:00 committed by Anas Nashif
parent 3651a7d108
commit a7749abbb5

View file

@ -53,9 +53,8 @@ struct eth_driver_api {
*/
static inline int eth_send(struct device *dev, uint8_t *buffer, uint16_t len)
{
struct eth_driver_api *api;
const struct eth_driver_api *api = dev->driver_api;
api = (struct eth_driver_api *)dev->driver_api;
return api->send(dev, buffer, len);
}
@ -72,9 +71,8 @@ static inline int eth_send(struct device *dev, uint8_t *buffer, uint16_t len)
static inline void eth_register_callback(struct device *dev,
void (*cb)(uint8_t *buffer, uint16_t len))
{
struct eth_driver_api *api;
const struct eth_driver_api *api = dev->driver_api;
api = (struct eth_driver_api *)dev->driver_api;
api->register_callback(dev, cb);
}