hdc1008: Limit name space pollution by using 'static'

The read16() name collides with other definitions within zephyr.  Make
it static and fix a few other unnecessary name exports while we are
here.

Change-Id: Id72d44a6b84b8d72c7ba2d0f34b29dbc1d02f2b6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
Marcus Shawcroft 2016-10-24 10:17:49 +01:00 committed by Anas Nashif
commit abefffeda6

View file

@ -101,7 +101,7 @@ static struct sensor_driver_api hdc1008_driver_api = {
.channel_get = hdc1008_channel_get, .channel_get = hdc1008_channel_get,
}; };
uint16_t read16(struct device *dev, uint8_t a, uint8_t d) static uint16_t read16(struct device *dev, uint8_t a, uint8_t d)
{ {
uint8_t buf[2]; uint8_t buf[2];
if (i2c_burst_read(dev, a, d, (uint8_t *)buf, 2) < 0) { if (i2c_burst_read(dev, a, d, (uint8_t *)buf, 2) < 0) {
@ -110,7 +110,7 @@ uint16_t read16(struct device *dev, uint8_t a, uint8_t d)
return (buf[0] << 8 | buf[1]); return (buf[0] << 8 | buf[1]);
} }
int hdc1008_init(struct device *dev) static int hdc1008_init(struct device *dev)
{ {
struct hdc1008_data *drv_data = dev->driver_data; struct hdc1008_data *drv_data = dev->driver_data;
@ -158,7 +158,7 @@ int hdc1008_init(struct device *dev)
return 0; return 0;
} }
struct hdc1008_data hdc1008_data; static struct hdc1008_data hdc1008_data;
DEVICE_INIT(hdc1008, CONFIG_HDC1008_NAME, hdc1008_init, &hdc1008_data, DEVICE_INIT(hdc1008, CONFIG_HDC1008_NAME, hdc1008_init, &hdc1008_data,
NULL, SECONDARY, CONFIG_SENSOR_INIT_PRIORITY); NULL, SECONDARY, CONFIG_SENSOR_INIT_PRIORITY);