diff options
| author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-26 09:01:42 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-21 09:45:42 -0400 |
| commit | aee38734d2e2a908c4fd50918f28f19c088abfb9 (patch) | |
| tree | 560fceabafb39a93a1de693b5528dbca5fbfe235 | |
| parent | 6ec19898ed6990baa285b8c96a8b1a0d0366bc46 (diff) | |
[media] v4l2-common: remove unused v4l2_chip_match/ident_i2c_client functions
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-common.c | 47 | ||||
| -rw-r--r-- | include/media/v4l2-common.h | 9 |
2 files changed, 1 insertions, 55 deletions
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 5fd76609e613..3b2a7606bc84 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c | |||
| @@ -61,7 +61,6 @@ | |||
| 61 | #include <media/v4l2-common.h> | 61 | #include <media/v4l2-common.h> |
| 62 | #include <media/v4l2-device.h> | 62 | #include <media/v4l2-device.h> |
| 63 | #include <media/v4l2-ctrls.h> | 63 | #include <media/v4l2-ctrls.h> |
| 64 | #include <media/v4l2-chip-ident.h> | ||
| 65 | 64 | ||
| 66 | #include <linux/videodev2.h> | 65 | #include <linux/videodev2.h> |
| 67 | 66 | ||
| @@ -227,51 +226,9 @@ u32 v4l2_ctrl_next(const u32 * const * ctrl_classes, u32 id) | |||
| 227 | } | 226 | } |
| 228 | EXPORT_SYMBOL(v4l2_ctrl_next); | 227 | EXPORT_SYMBOL(v4l2_ctrl_next); |
| 229 | 228 | ||
| 230 | #if IS_ENABLED(CONFIG_I2C) | ||
| 231 | int v4l2_chip_match_i2c_client(struct i2c_client *c, const struct v4l2_dbg_match *match) | ||
| 232 | { | ||
| 233 | int len; | ||
| 234 | |||
| 235 | if (c == NULL || match == NULL) | ||
| 236 | return 0; | ||
| 237 | |||
| 238 | switch (match->type) { | ||
| 239 | case V4L2_CHIP_MATCH_I2C_DRIVER: | ||
| 240 | if (c->driver == NULL || c->driver->driver.name == NULL) | ||
| 241 | return 0; | ||
| 242 | len = strlen(c->driver->driver.name); | ||
| 243 | return len && !strncmp(c->driver->driver.name, match->name, len); | ||
| 244 | case V4L2_CHIP_MATCH_I2C_ADDR: | ||
| 245 | return c->addr == match->addr; | ||
| 246 | case V4L2_CHIP_MATCH_SUBDEV: | ||
| 247 | return 1; | ||
| 248 | default: | ||
| 249 | return 0; | ||
| 250 | } | ||
| 251 | } | ||
| 252 | EXPORT_SYMBOL(v4l2_chip_match_i2c_client); | ||
| 253 | |||
| 254 | int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_dbg_chip_ident *chip, | ||
| 255 | u32 ident, u32 revision) | ||
| 256 | { | ||
| 257 | if (!v4l2_chip_match_i2c_client(c, &chip->match)) | ||
| 258 | return 0; | ||
| 259 | if (chip->ident == V4L2_IDENT_NONE) { | ||
| 260 | chip->ident = ident; | ||
| 261 | chip->revision = revision; | ||
| 262 | } | ||
| 263 | else { | ||
| 264 | chip->ident = V4L2_IDENT_AMBIGUOUS; | ||
| 265 | chip->revision = 0; | ||
| 266 | } | ||
| 267 | return 0; | ||
| 268 | } | ||
| 269 | EXPORT_SYMBOL(v4l2_chip_ident_i2c_client); | ||
| 270 | |||
| 271 | /* ----------------------------------------------------------------- */ | ||
| 272 | |||
| 273 | /* I2C Helper functions */ | 229 | /* I2C Helper functions */ |
| 274 | 230 | ||
| 231 | #if IS_ENABLED(CONFIG_I2C) | ||
| 275 | 232 | ||
| 276 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 233 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |
| 277 | const struct v4l2_subdev_ops *ops) | 234 | const struct v4l2_subdev_ops *ops) |
| @@ -290,8 +247,6 @@ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | |||
| 290 | } | 247 | } |
| 291 | EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init); | 248 | EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init); |
| 292 | 249 | ||
| 293 | |||
| 294 | |||
| 295 | /* Load an i2c sub-device. */ | 250 | /* Load an i2c sub-device. */ |
| 296 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | 251 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, |
| 297 | struct i2c_adapter *adapter, struct i2c_board_info *info, | 252 | struct i2c_adapter *adapter, struct i2c_board_info *info, |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index e7821fb3cd86..015ff82da73c 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -100,15 +100,6 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | |||
| 100 | 100 | ||
| 101 | /* ------------------------------------------------------------------------- */ | 101 | /* ------------------------------------------------------------------------- */ |
| 102 | 102 | ||
| 103 | /* Register/chip ident helper function */ | ||
| 104 | |||
| 105 | struct i2c_client; /* forward reference */ | ||
| 106 | int v4l2_chip_match_i2c_client(struct i2c_client *c, const struct v4l2_dbg_match *match); | ||
| 107 | int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_dbg_chip_ident *chip, | ||
| 108 | u32 ident, u32 revision); | ||
| 109 | |||
| 110 | /* ------------------------------------------------------------------------- */ | ||
| 111 | |||
| 112 | /* I2C Helper functions */ | 103 | /* I2C Helper functions */ |
| 113 | 104 | ||
| 114 | struct i2c_driver; | 105 | struct i2c_driver; |
