diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/i2c/mt9v111.c | 41 | ||||
| -rw-r--r-- | drivers/media/platform/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-csid.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-csiphy.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-ispif.c | 5 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 1 | ||||
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss.c | 15 | ||||
| -rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9035.c | 6 | ||||
| -rw-r--r-- | drivers/staging/media/mt9t031/Kconfig | 6 |
12 files changed, 36 insertions, 45 deletions
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index b5410aeb5fe2..bb41bea950ac 100644 --- a/drivers/media/i2c/mt9v111.c +++ b/drivers/media/i2c/mt9v111.c | |||
| @@ -1159,41 +1159,21 @@ static int mt9v111_probe(struct i2c_client *client) | |||
| 1159 | V4L2_CID_AUTO_WHITE_BALANCE, | 1159 | V4L2_CID_AUTO_WHITE_BALANCE, |
| 1160 | 0, 1, 1, | 1160 | 0, 1, 1, |
| 1161 | V4L2_WHITE_BALANCE_AUTO); | 1161 | V4L2_WHITE_BALANCE_AUTO); |
| 1162 | if (IS_ERR_OR_NULL(mt9v111->auto_awb)) { | ||
| 1163 | ret = PTR_ERR(mt9v111->auto_awb); | ||
| 1164 | goto error_free_ctrls; | ||
| 1165 | } | ||
| 1166 | |||
| 1167 | mt9v111->auto_exp = v4l2_ctrl_new_std_menu(&mt9v111->ctrls, | 1162 | mt9v111->auto_exp = v4l2_ctrl_new_std_menu(&mt9v111->ctrls, |
| 1168 | &mt9v111_ctrl_ops, | 1163 | &mt9v111_ctrl_ops, |
| 1169 | V4L2_CID_EXPOSURE_AUTO, | 1164 | V4L2_CID_EXPOSURE_AUTO, |
| 1170 | V4L2_EXPOSURE_MANUAL, | 1165 | V4L2_EXPOSURE_MANUAL, |
| 1171 | 0, V4L2_EXPOSURE_AUTO); | 1166 | 0, V4L2_EXPOSURE_AUTO); |
| 1172 | if (IS_ERR_OR_NULL(mt9v111->auto_exp)) { | ||
| 1173 | ret = PTR_ERR(mt9v111->auto_exp); | ||
| 1174 | goto error_free_ctrls; | ||
| 1175 | } | ||
| 1176 | |||
| 1177 | /* Initialize timings */ | ||
| 1178 | mt9v111->hblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, | 1167 | mt9v111->hblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, |
| 1179 | V4L2_CID_HBLANK, | 1168 | V4L2_CID_HBLANK, |
| 1180 | MT9V111_CORE_R05_MIN_HBLANK, | 1169 | MT9V111_CORE_R05_MIN_HBLANK, |
| 1181 | MT9V111_CORE_R05_MAX_HBLANK, 1, | 1170 | MT9V111_CORE_R05_MAX_HBLANK, 1, |
| 1182 | MT9V111_CORE_R05_DEF_HBLANK); | 1171 | MT9V111_CORE_R05_DEF_HBLANK); |
| 1183 | if (IS_ERR_OR_NULL(mt9v111->hblank)) { | ||
| 1184 | ret = PTR_ERR(mt9v111->hblank); | ||
| 1185 | goto error_free_ctrls; | ||
| 1186 | } | ||
| 1187 | |||
| 1188 | mt9v111->vblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, | 1172 | mt9v111->vblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, |
| 1189 | V4L2_CID_VBLANK, | 1173 | V4L2_CID_VBLANK, |
| 1190 | MT9V111_CORE_R06_MIN_VBLANK, | 1174 | MT9V111_CORE_R06_MIN_VBLANK, |
| 1191 | MT9V111_CORE_R06_MAX_VBLANK, 1, | 1175 | MT9V111_CORE_R06_MAX_VBLANK, 1, |
| 1192 | MT9V111_CORE_R06_DEF_VBLANK); | 1176 | MT9V111_CORE_R06_DEF_VBLANK); |
| 1193 | if (IS_ERR_OR_NULL(mt9v111->vblank)) { | ||
| 1194 | ret = PTR_ERR(mt9v111->vblank); | ||
| 1195 | goto error_free_ctrls; | ||
| 1196 | } | ||
| 1197 | 1177 | ||
| 1198 | /* PIXEL_RATE is fixed: just expose it to user space. */ | 1178 | /* PIXEL_RATE is fixed: just expose it to user space. */ |
| 1199 | v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, | 1179 | v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops, |
| @@ -1201,6 +1181,10 @@ static int mt9v111_probe(struct i2c_client *client) | |||
| 1201 | DIV_ROUND_CLOSEST(mt9v111->sysclk, 2), 1, | 1181 | DIV_ROUND_CLOSEST(mt9v111->sysclk, 2), 1, |
| 1202 | DIV_ROUND_CLOSEST(mt9v111->sysclk, 2)); | 1182 | DIV_ROUND_CLOSEST(mt9v111->sysclk, 2)); |
| 1203 | 1183 | ||
| 1184 | if (mt9v111->ctrls.error) { | ||
| 1185 | ret = mt9v111->ctrls.error; | ||
| 1186 | goto error_free_ctrls; | ||
| 1187 | } | ||
| 1204 | mt9v111->sd.ctrl_handler = &mt9v111->ctrls; | 1188 | mt9v111->sd.ctrl_handler = &mt9v111->ctrls; |
| 1205 | 1189 | ||
| 1206 | /* Start with default configuration: 640x480 UYVY. */ | 1190 | /* Start with default configuration: 640x480 UYVY. */ |
| @@ -1226,26 +1210,27 @@ static int mt9v111_probe(struct i2c_client *client) | |||
| 1226 | mt9v111->pad.flags = MEDIA_PAD_FL_SOURCE; | 1210 | mt9v111->pad.flags = MEDIA_PAD_FL_SOURCE; |
| 1227 | ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad); | 1211 | ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad); |
| 1228 | if (ret) | 1212 | if (ret) |
| 1229 | goto error_free_ctrls; | 1213 | goto error_free_entity; |
| 1230 | #endif | 1214 | #endif |
| 1231 | 1215 | ||
| 1232 | ret = mt9v111_chip_probe(mt9v111); | 1216 | ret = mt9v111_chip_probe(mt9v111); |
| 1233 | if (ret) | 1217 | if (ret) |
| 1234 | goto error_free_ctrls; | 1218 | goto error_free_entity; |
| 1235 | 1219 | ||
| 1236 | ret = v4l2_async_register_subdev(&mt9v111->sd); | 1220 | ret = v4l2_async_register_subdev(&mt9v111->sd); |
| 1237 | if (ret) | 1221 | if (ret) |
| 1238 | goto error_free_ctrls; | 1222 | goto error_free_entity; |
| 1239 | 1223 | ||
| 1240 | return 0; | 1224 | return 0; |
| 1241 | 1225 | ||
| 1242 | error_free_ctrls: | 1226 | error_free_entity: |
| 1243 | v4l2_ctrl_handler_free(&mt9v111->ctrls); | ||
| 1244 | |||
| 1245 | #if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) | 1227 | #if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) |
| 1246 | media_entity_cleanup(&mt9v111->sd.entity); | 1228 | media_entity_cleanup(&mt9v111->sd.entity); |
| 1247 | #endif | 1229 | #endif |
| 1248 | 1230 | ||
| 1231 | error_free_ctrls: | ||
| 1232 | v4l2_ctrl_handler_free(&mt9v111->ctrls); | ||
| 1233 | |||
| 1249 | mutex_destroy(&mt9v111->pwr_mutex); | 1234 | mutex_destroy(&mt9v111->pwr_mutex); |
| 1250 | mutex_destroy(&mt9v111->stream_mutex); | 1235 | mutex_destroy(&mt9v111->stream_mutex); |
| 1251 | 1236 | ||
| @@ -1259,12 +1244,12 @@ static int mt9v111_remove(struct i2c_client *client) | |||
| 1259 | 1244 | ||
| 1260 | v4l2_async_unregister_subdev(sd); | 1245 | v4l2_async_unregister_subdev(sd); |
| 1261 | 1246 | ||
| 1262 | v4l2_ctrl_handler_free(&mt9v111->ctrls); | ||
| 1263 | |||
| 1264 | #if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) | 1247 | #if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) |
| 1265 | media_entity_cleanup(&sd->entity); | 1248 | media_entity_cleanup(&sd->entity); |
| 1266 | #endif | 1249 | #endif |
| 1267 | 1250 | ||
| 1251 | v4l2_ctrl_handler_free(&mt9v111->ctrls); | ||
| 1252 | |||
| 1268 | mutex_destroy(&mt9v111->pwr_mutex); | 1253 | mutex_destroy(&mt9v111->pwr_mutex); |
| 1269 | mutex_destroy(&mt9v111->stream_mutex); | 1254 | mutex_destroy(&mt9v111->stream_mutex); |
| 1270 | 1255 | ||
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 94c1fe0e9787..54fe90acb5b2 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig | |||
| @@ -541,6 +541,8 @@ config VIDEO_CROS_EC_CEC | |||
| 541 | depends on MFD_CROS_EC | 541 | depends on MFD_CROS_EC |
| 542 | select CEC_CORE | 542 | select CEC_CORE |
| 543 | select CEC_NOTIFIER | 543 | select CEC_NOTIFIER |
| 544 | select CHROME_PLATFORMS | ||
| 545 | select CROS_EC_PROTO | ||
| 544 | ---help--- | 546 | ---help--- |
| 545 | If you say yes here you will get support for the | 547 | If you say yes here you will get support for the |
| 546 | ChromeOS Embedded Controller's CEC. | 548 | ChromeOS Embedded Controller's CEC. |
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c index 729b31891466..a5ae85674ffb 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.c +++ b/drivers/media/platform/qcom/camss/camss-csid.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
| 12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
| 13 | #include <linux/io.h> | ||
| 13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| 14 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c index c832539397d7..12bce391d71f 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
| 14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/io.h> | ||
| 15 | 16 | ||
| 16 | #define CAMSS_CSI_PHY_LNn_CFG2(n) (0x004 + 0x40 * (n)) | 17 | #define CAMSS_CSI_PHY_LNn_CFG2(n) (0x004 + 0x40 * (n)) |
| 17 | #define CAMSS_CSI_PHY_LNn_CFG3(n) (0x008 + 0x40 * (n)) | 18 | #define CAMSS_CSI_PHY_LNn_CFG3(n) (0x008 + 0x40 * (n)) |
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index bcd0dfd33618..2e65caf1ecae 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
| 14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/io.h> | ||
| 15 | 16 | ||
| 16 | #define CSIPHY_3PH_LNn_CFG1(n) (0x000 + 0x100 * (n)) | 17 | #define CSIPHY_3PH_LNn_CFG1(n) (0x000 + 0x100 * (n)) |
| 17 | #define CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG (BIT(7) | BIT(6)) | 18 | #define CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG (BIT(7) | BIT(6)) |
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index 4559f3b1b38c..008afb85023b 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
| 12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
| 13 | #include <linux/io.h> | ||
| 13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| 14 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c index 7f269021d08c..1f33b4eb198c 100644 --- a/drivers/media/platform/qcom/camss/camss-ispif.c +++ b/drivers/media/platform/qcom/camss/camss-ispif.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
| 12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
| 13 | #include <linux/io.h> | ||
| 13 | #include <linux/iopoll.h> | 14 | #include <linux/iopoll.h> |
| 14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| @@ -1076,8 +1077,8 @@ int msm_ispif_subdev_init(struct ispif_device *ispif, | |||
| 1076 | else | 1077 | else |
| 1077 | return -EINVAL; | 1078 | return -EINVAL; |
| 1078 | 1079 | ||
| 1079 | ispif->line = kcalloc(ispif->line_num, sizeof(*ispif->line), | 1080 | ispif->line = devm_kcalloc(dev, ispif->line_num, sizeof(*ispif->line), |
| 1080 | GFP_KERNEL); | 1081 | GFP_KERNEL); |
| 1081 | if (!ispif->line) | 1082 | if (!ispif->line) |
| 1082 | return -ENOMEM; | 1083 | return -ENOMEM; |
| 1083 | 1084 | ||
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c index da3a9fed9f2d..174a36be6f5d 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/io.h> | ||
| 12 | #include <linux/iopoll.h> | 13 | #include <linux/iopoll.h> |
| 13 | 14 | ||
| 14 | #include "camss-vfe.h" | 15 | #include "camss-vfe.h" |
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c index 4c584bffd179..0dca8bf9281e 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/io.h> | ||
| 12 | #include <linux/iopoll.h> | 13 | #include <linux/iopoll.h> |
| 13 | 14 | ||
| 14 | #include "camss-vfe.h" | 15 | #include "camss-vfe.h" |
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index dcc0c30ef1b1..669615fff6a0 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c | |||
| @@ -848,17 +848,18 @@ static int camss_probe(struct platform_device *pdev) | |||
| 848 | return -EINVAL; | 848 | return -EINVAL; |
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | camss->csiphy = kcalloc(camss->csiphy_num, sizeof(*camss->csiphy), | 851 | camss->csiphy = devm_kcalloc(dev, camss->csiphy_num, |
| 852 | GFP_KERNEL); | 852 | sizeof(*camss->csiphy), GFP_KERNEL); |
| 853 | if (!camss->csiphy) | 853 | if (!camss->csiphy) |
| 854 | return -ENOMEM; | 854 | return -ENOMEM; |
| 855 | 855 | ||
| 856 | camss->csid = kcalloc(camss->csid_num, sizeof(*camss->csid), | 856 | camss->csid = devm_kcalloc(dev, camss->csid_num, sizeof(*camss->csid), |
| 857 | GFP_KERNEL); | 857 | GFP_KERNEL); |
| 858 | if (!camss->csid) | 858 | if (!camss->csid) |
| 859 | return -ENOMEM; | 859 | return -ENOMEM; |
| 860 | 860 | ||
| 861 | camss->vfe = kcalloc(camss->vfe_num, sizeof(*camss->vfe), GFP_KERNEL); | 861 | camss->vfe = devm_kcalloc(dev, camss->vfe_num, sizeof(*camss->vfe), |
| 862 | GFP_KERNEL); | ||
| 862 | if (!camss->vfe) | 863 | if (!camss->vfe) |
| 863 | return -ENOMEM; | 864 | return -ENOMEM; |
| 864 | 865 | ||
| @@ -993,12 +994,12 @@ static const struct of_device_id camss_dt_match[] = { | |||
| 993 | 994 | ||
| 994 | MODULE_DEVICE_TABLE(of, camss_dt_match); | 995 | MODULE_DEVICE_TABLE(of, camss_dt_match); |
| 995 | 996 | ||
| 996 | static int camss_runtime_suspend(struct device *dev) | 997 | static int __maybe_unused camss_runtime_suspend(struct device *dev) |
| 997 | { | 998 | { |
| 998 | return 0; | 999 | return 0; |
| 999 | } | 1000 | } |
| 1000 | 1001 | ||
| 1001 | static int camss_runtime_resume(struct device *dev) | 1002 | static int __maybe_unused camss_runtime_resume(struct device *dev) |
| 1002 | { | 1003 | { |
| 1003 | return 0; | 1004 | return 0; |
| 1004 | } | 1005 | } |
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 666d319d3d1a..1f6c1eefe389 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c | |||
| @@ -402,8 +402,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, | |||
| 402 | if (msg[0].addr == state->af9033_i2c_addr[1]) | 402 | if (msg[0].addr == state->af9033_i2c_addr[1]) |
| 403 | reg |= 0x100000; | 403 | reg |= 0x100000; |
| 404 | 404 | ||
| 405 | ret = af9035_wr_regs(d, reg, &msg[0].buf[3], | 405 | ret = (msg[0].len >= 3) ? af9035_wr_regs(d, reg, |
| 406 | msg[0].len - 3); | 406 | &msg[0].buf[3], |
| 407 | msg[0].len - 3) | ||
| 408 | : -EOPNOTSUPP; | ||
| 407 | } else { | 409 | } else { |
| 408 | /* I2C write */ | 410 | /* I2C write */ |
| 409 | u8 buf[MAX_XFER_SIZE]; | 411 | u8 buf[MAX_XFER_SIZE]; |
diff --git a/drivers/staging/media/mt9t031/Kconfig b/drivers/staging/media/mt9t031/Kconfig index f48e06a03cdb..9a58aaf72edd 100644 --- a/drivers/staging/media/mt9t031/Kconfig +++ b/drivers/staging/media/mt9t031/Kconfig | |||
| @@ -1,9 +1,3 @@ | |||
| 1 | config SOC_CAMERA_IMX074 | ||
| 2 | tristate "imx074 support (DEPRECATED)" | ||
| 3 | depends on SOC_CAMERA && I2C | ||
| 4 | help | ||
| 5 | This driver supports IMX074 cameras from Sony | ||
| 6 | |||
| 7 | config SOC_CAMERA_MT9T031 | 1 | config SOC_CAMERA_MT9T031 |
| 8 | tristate "mt9t031 support (DEPRECATED)" | 2 | tristate "mt9t031 support (DEPRECATED)" |
| 9 | depends on SOC_CAMERA && I2C | 3 | depends on SOC_CAMERA && I2C |
