Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: staging: max96712: Remove device id check

This check is incorrect and checks the wrong register. Furthermore there
is no documented shared device id register for MAX96712. There might be
overlap with the soon to be added MAX96724 device which do document such
a register.

However as the check was merely a precaution and to check during
development that the driver could talk to the device there is no harm in
removing it all together. A correct and more sophisticated check can be
added later if there ever is a need to differentiate between different
versions of a device.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Niklas Söderlund and committed by
Mauro Carvalho Chehab
aa1e8e18 708cef6d

-18
-18
drivers/staging/media/max96712/max96712.c
··· 16 16 #include <media/v4l2-fwnode.h> 17 17 #include <media/v4l2-subdev.h> 18 18 19 - #define MAX96712_ID 0x20 20 - 21 19 #define MAX96712_DPLL_FREQ 1000 22 20 23 21 enum max96712_pattern { ··· 37 39 38 40 enum max96712_pattern pattern; 39 41 }; 40 - 41 - static int max96712_read(struct max96712_priv *priv, int reg) 42 - { 43 - int ret, val; 44 - 45 - ret = regmap_read(priv->regmap, reg, &val); 46 - if (ret) { 47 - dev_err(&priv->client->dev, "read 0x%04x failed\n", reg); 48 - return ret; 49 - } 50 - 51 - return val; 52 - } 53 42 54 43 static int max96712_write(struct max96712_priv *priv, unsigned int reg, u8 val) 55 44 { ··· 422 437 423 438 if (priv->gpiod_pwdn) 424 439 usleep_range(4000, 5000); 425 - 426 - if (max96712_read(priv, 0x4a) != MAX96712_ID) 427 - return -ENODEV; 428 440 429 441 max96712_reset(priv); 430 442