iio: common: st_sensors: move st_sensors_of_i2c_probe() in common code
Move st_sensors_of_i2c_probe() in st_sensors_core and rename it in st_sensors_of_name_probe(). That change is necessary to add device-tree support in spi code otherwise the rest of the autodetection will fail since spi->modalias (and indio_dev->name) will be set using compatible string value that differs from standard sensor name Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
committed by
Jonathan Cameron
parent
1371856416
commit
250bbbdbed
@@ -325,4 +325,16 @@ ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev,
|
||||
ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
void st_sensors_of_name_probe(struct device *dev,
|
||||
const struct of_device_id *match,
|
||||
char *name, int len);
|
||||
#else
|
||||
static inline void st_sensors_of_name_probe(struct device *dev,
|
||||
const struct of_device_id *match,
|
||||
char *name, int len)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ST_SENSORS_H */
|
||||
|
||||
@@ -18,16 +18,6 @@
|
||||
void st_sensors_i2c_configure(struct iio_dev *indio_dev,
|
||||
struct i2c_client *client, struct st_sensor_data *sdata);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
void st_sensors_of_i2c_probe(struct i2c_client *client,
|
||||
const struct of_device_id *match);
|
||||
#else
|
||||
static inline void st_sensors_of_i2c_probe(struct i2c_client *client,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
int st_sensors_match_acpi_device(struct device *dev);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user