main: Rename SensorDriver member name to driver_name

So we don't confuse it with the SensorDevice name field.
This commit is contained in:
Bastien Nocera
2021-01-19 11:21:57 +01:00
parent e4eb952da2
commit a4b9cb73b5
12 changed files with 13 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ typedef void (*ReadingsUpdateFunc) (SensorDevice *sensor_device,
typedef struct {
const char *name;
const char *driver_name;
DriverType type;
gboolean (*discover) (GUdevDevice *device);

View File

@@ -108,7 +108,7 @@ fake_compass_close (SensorDevice *sensor_device)
}
SensorDriver fake_compass = {
.name = "Fake compass",
.driver_name = "Fake compass",
.type = DRIVER_TYPE_COMPASS,
.discover = fake_compass_discover,

View File

@@ -108,7 +108,7 @@ fake_light_close (SensorDevice *sensor_device)
}
SensorDriver fake_light = {
.name = "Fake light",
.driver_name = "Fake light",
.type = DRIVER_TYPE_LIGHT,
.discover = fake_light_discover,

View File

@@ -106,7 +106,7 @@ hwmon_light_close (SensorDevice *sensor_device)
}
SensorDriver hwmon_light = {
.name = "Platform HWMon Light",
.driver_name = "Platform HWMon Light",
.type = DRIVER_TYPE_LIGHT,
.discover = hwmon_light_discover,

View File

@@ -244,7 +244,7 @@ iio_buffer_accel_close (SensorDevice *sensor_device)
}
SensorDriver iio_buffer_accel = {
.name = "IIO Buffer accelerometer",
.driver_name = "IIO Buffer accelerometer",
.type = DRIVER_TYPE_ACCEL,
.discover = iio_buffer_accel_discover,

View File

@@ -212,7 +212,7 @@ iio_buffer_compass_close (SensorDevice *sensor_device)
}
SensorDriver iio_buffer_compass = {
.name = "IIO Buffer Compass",
.driver_name = "IIO Buffer Compass",
.type = DRIVER_TYPE_COMPASS,
.discover = iio_buffer_compass_discover,

View File

@@ -216,7 +216,7 @@ iio_buffer_light_close (SensorDevice *sensor_device)
}
SensorDriver iio_buffer_light = {
.name = "IIO Buffer Light sensor",
.driver_name = "IIO Buffer Light sensor",
.type = DRIVER_TYPE_LIGHT,
.discover = iio_buffer_light_discover,

View File

@@ -129,7 +129,7 @@ iio_poll_accel_close (SensorDevice *sensor_device)
}
SensorDriver iio_poll_accel = {
.name = "IIO Poll accelerometer",
.driver_name = "IIO Poll accelerometer",
.type = DRIVER_TYPE_ACCEL,
.discover = iio_poll_accel_discover,

View File

@@ -177,7 +177,7 @@ iio_poll_light_close (SensorDevice *sensor_device)
}
SensorDriver iio_poll_light = {
.name = "IIO Polling Light sensor",
.driver_name = "IIO Polling Light sensor",
.type = DRIVER_TYPE_LIGHT,
.discover = iio_poll_light_discover,

View File

@@ -128,7 +128,7 @@ iio_poll_proximity_close (SensorDevice *sensor_device)
}
SensorDriver iio_poll_proximity = {
.name = "IIO Poll proximity sensor",
.driver_name = "IIO Poll proximity sensor",
.type = DRIVER_TYPE_PROXIMITY,
.discover = iio_poll_proximity_discover,

View File

@@ -268,7 +268,7 @@ input_accel_close (SensorDevice *sensor_device)
}
SensorDriver input_accel = {
.name = "Input accelerometer",
.driver_name = "Input accelerometer",
.type = DRIVER_TYPE_ACCEL,
.discover = input_accel_discover,

View File

@@ -130,7 +130,7 @@ find_sensors (GUdevClient *client,
g_debug ("Found device %s of type %s at %s",
g_udev_device_get_sysfs_path (dev),
driver_type_to_str (driver->type),
driver->name);
driver->driver_name);
UDEV_DEVICE_FOR_TYPE(driver->type) = g_object_ref (dev);
DRIVER_FOR_TYPE(driver->type) = (SensorDriver *) driver;
@@ -856,7 +856,7 @@ sensor_changes (GUdevClient *client,
g_debug ("Found hotplugged device %s of type %s at %s",
g_udev_device_get_sysfs_path (device),
driver_type_to_str (driver->type),
driver->name);
driver->driver_name);
if (driver_open (driver, device,
driver_type_to_callback_func (driver->type), data)) {