mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
iio: accel: mma7455_i2c: Convert to i2c's .probe_new()
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20221118224540.619276-56-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
09cec08352
commit
17b9a72f4a
1 changed files with 3 additions and 3 deletions
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
#include "mma7455.h"
|
#include "mma7455.h"
|
||||||
|
|
||||||
static int mma7455_i2c_probe(struct i2c_client *i2c,
|
static int mma7455_i2c_probe(struct i2c_client *i2c)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
|
const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ static const struct of_device_id mma7455_of_match[] = {
|
||||||
MODULE_DEVICE_TABLE(of, mma7455_of_match);
|
MODULE_DEVICE_TABLE(of, mma7455_of_match);
|
||||||
|
|
||||||
static struct i2c_driver mma7455_i2c_driver = {
|
static struct i2c_driver mma7455_i2c_driver = {
|
||||||
.probe = mma7455_i2c_probe,
|
.probe_new = mma7455_i2c_probe,
|
||||||
.remove = mma7455_i2c_remove,
|
.remove = mma7455_i2c_remove,
|
||||||
.id_table = mma7455_i2c_ids,
|
.id_table = mma7455_i2c_ids,
|
||||||
.driver = {
|
.driver = {
|
||||||
|
|
Loading…
Reference in a new issue