| .. | .. |
|---|
| 16 | 16 | #include <linux/irq.h> |
|---|
| 17 | 17 | #include <linux/i2c.h> |
|---|
| 18 | 18 | #include <linux/mutex.h> |
|---|
| 19 | | -#include <linux/of.h> |
|---|
| 19 | +#include <linux/property.h> |
|---|
| 20 | 20 | #include <linux/regmap.h> |
|---|
| 21 | 21 | #include <linux/iio/iio.h> |
|---|
| 22 | 22 | #include <linux/iio/buffer.h> |
|---|
| .. | .. |
|---|
| 267 | 267 | static int max30100_led_init(struct max30100_data *data) |
|---|
| 268 | 268 | { |
|---|
| 269 | 269 | struct device *dev = &data->client->dev; |
|---|
| 270 | | - struct device_node *np = dev->of_node; |
|---|
| 271 | 270 | unsigned int val[2]; |
|---|
| 272 | 271 | int reg, ret; |
|---|
| 273 | 272 | |
|---|
| 274 | | - ret = of_property_read_u32_array(np, "maxim,led-current-microamp", |
|---|
| 273 | + ret = device_property_read_u32_array(dev, "maxim,led-current-microamp", |
|---|
| 275 | 274 | (unsigned int *) &val, 2); |
|---|
| 276 | 275 | if (ret) { |
|---|
| 277 | 276 | /* Default to 24 mA RED LED, 50 mA IR LED */ |
|---|
| .. | .. |
|---|
| 440 | 439 | indio_dev->available_scan_masks = max30100_scan_masks; |
|---|
| 441 | 440 | indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE); |
|---|
| 442 | 441 | indio_dev->setup_ops = &max30100_buffer_setup_ops; |
|---|
| 443 | | - indio_dev->dev.parent = &client->dev; |
|---|
| 444 | 442 | |
|---|
| 445 | 443 | data = iio_priv(indio_dev); |
|---|
| 446 | 444 | data->indio_dev = indio_dev; |
|---|
| .. | .. |
|---|
| 502 | 500 | static struct i2c_driver max30100_driver = { |
|---|
| 503 | 501 | .driver = { |
|---|
| 504 | 502 | .name = MAX30100_DRV_NAME, |
|---|
| 505 | | - .of_match_table = of_match_ptr(max30100_dt_ids), |
|---|
| 503 | + .of_match_table = max30100_dt_ids, |
|---|
| 506 | 504 | }, |
|---|
| 507 | 505 | .probe = max30100_probe, |
|---|
| 508 | 506 | .remove = max30100_remove, |
|---|