aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-21 05:33:03 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-21 08:44:55 -0400
commit64131a87f2aae2ed9e05d8227c5b009ca6c50d98 (patch)
treefdea23fd59216120bf54a48c60ca24489a733f14 /drivers/media
parent676ee36be04985062522804c2de04f0764212be6 (diff)
parent2c33ce009ca2389dbf0535d0672214d09738e35e (diff)
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits) media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format hexdump: avoid warning in test function fs: take i_mutex during prepare_binprm for set[ug]id executables smp: Fix error case handling in smp_call_function_*() iommu-common: Fix PARISC compile-time warnings sparc: Make LDC use common iommu poll management functions sparc: Make sparc64 use scalable lib/iommu-common.c functions Break up monolithic iommu table/lock into finer graularity pools and lock sparc: Revert generic IOMMU allocator. tools/power turbostat: correct dumped pkg-cstate-limit value tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL tools/power turbostat: correct DRAM RAPL units on recent Xeon processors tools/power turbostat: Initial Skylake support tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile tools/power turbostat: modprobe msr, if needed tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2 tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names Bluetooth: hidp: Fix regression with older userspace and flags validation config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected perf/x86/intel/pt: Fix and clean up error handling in pt_event_add() ... That solves several merge conflicts: Documentation/DocBook/media/v4l/subdev-formats.xml Documentation/devicetree/bindings/vendor-prefixes.txt drivers/staging/media/mn88473/mn88473.c include/linux/kconfig.h include/uapi/linux/media-bus-format.h The ones at subdev-formats.xml and media-bus-format.h are not trivial. That's why we opted to merge from DRM.
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-core/dvb_net.c1
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_c.c2
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_core.c6
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_priv.h2
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_t.c2
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_t2.c2
-rw-r--r--drivers/media/pci/bt8xx/bt878.c12
-rw-r--r--drivers/media/pci/bt8xx/bt878.h11
-rw-r--r--drivers/media/platform/am437x/am437x-vpfe.c1
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c3
-rw-r--r--drivers/media/rc/ene_ir.c13
-rw-r--r--drivers/media/rc/fintek-cir.c13
-rw-r--r--drivers/media/rc/ite-cir.c13
-rw-r--r--drivers/media/rc/nuvoton-cir.c13
-rw-r--r--drivers/media/tuners/msi001.c2
15 files changed, 10 insertions, 86 deletions
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 1508d918205d..a694fb1ea228 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -1190,7 +1190,6 @@ static int dvb_net_stop(struct net_device *dev)
1190static const struct header_ops dvb_header_ops = { 1190static const struct header_ops dvb_header_ops = {
1191 .create = eth_header, 1191 .create = eth_header,
1192 .parse = eth_header_parse, 1192 .parse = eth_header_parse,
1193 .rebuild = eth_rebuild_header,
1194}; 1193};
1195 1194
1196 1195
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c
index 149fdca3fb44..72b0e2db3aab 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -79,7 +79,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe)
79 79
80 num = if_freq / 1000; /* Hz => kHz */ 80 num = if_freq / 1000; /* Hz => kHz */
81 num *= 0x4000; 81 num *= 0x4000;
82 if_ctl = 0x4000 - cxd2820r_div_u64_round_closest(num, 41000); 82 if_ctl = 0x4000 - DIV_ROUND_CLOSEST_ULL(num, 41000);
83 buf[0] = (if_ctl >> 8) & 0x3f; 83 buf[0] = (if_ctl >> 8) & 0x3f;
84 buf[1] = (if_ctl >> 0) & 0xff; 84 buf[1] = (if_ctl >> 0) & 0xff;
85 85
diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c
index 422e84bbb008..490e090048ef 100644
--- a/drivers/media/dvb-frontends/cxd2820r_core.c
+++ b/drivers/media/dvb-frontends/cxd2820r_core.c
@@ -244,12 +244,6 @@ error:
244 return ret; 244 return ret;
245} 245}
246 246
247/* 64 bit div with round closest, like DIV_ROUND_CLOSEST but 64 bit */
248u32 cxd2820r_div_u64_round_closest(u64 dividend, u32 divisor)
249{
250 return div_u64(dividend + (divisor / 2), divisor);
251}
252
253static int cxd2820r_set_frontend(struct dvb_frontend *fe) 247static int cxd2820r_set_frontend(struct dvb_frontend *fe)
254{ 248{
255 struct cxd2820r_priv *priv = fe->demodulator_priv; 249 struct cxd2820r_priv *priv = fe->demodulator_priv;
diff --git a/drivers/media/dvb-frontends/cxd2820r_priv.h b/drivers/media/dvb-frontends/cxd2820r_priv.h
index 7ff5f60c83e1..4b428959b16e 100644
--- a/drivers/media/dvb-frontends/cxd2820r_priv.h
+++ b/drivers/media/dvb-frontends/cxd2820r_priv.h
@@ -64,8 +64,6 @@ int cxd2820r_wr_reg_mask(struct cxd2820r_priv *priv, u32 reg, u8 val,
64int cxd2820r_wr_regs(struct cxd2820r_priv *priv, u32 reginfo, u8 *val, 64int cxd2820r_wr_regs(struct cxd2820r_priv *priv, u32 reginfo, u8 *val,
65 int len); 65 int len);
66 66
67u32 cxd2820r_div_u64_round_closest(u64 dividend, u32 divisor);
68
69int cxd2820r_wr_regs(struct cxd2820r_priv *priv, u32 reginfo, u8 *val, 67int cxd2820r_wr_regs(struct cxd2820r_priv *priv, u32 reginfo, u8 *val,
70 int len); 68 int len);
71 69
diff --git a/drivers/media/dvb-frontends/cxd2820r_t.c b/drivers/media/dvb-frontends/cxd2820r_t.c
index 51401d036530..008cb2ac8480 100644
--- a/drivers/media/dvb-frontends/cxd2820r_t.c
+++ b/drivers/media/dvb-frontends/cxd2820r_t.c
@@ -103,7 +103,7 @@ int cxd2820r_set_frontend_t(struct dvb_frontend *fe)
103 103
104 num = if_freq / 1000; /* Hz => kHz */ 104 num = if_freq / 1000; /* Hz => kHz */
105 num *= 0x1000000; 105 num *= 0x1000000;
106 if_ctl = cxd2820r_div_u64_round_closest(num, 41000); 106 if_ctl = DIV_ROUND_CLOSEST_ULL(num, 41000);
107 buf[0] = ((if_ctl >> 16) & 0xff); 107 buf[0] = ((if_ctl >> 16) & 0xff);
108 buf[1] = ((if_ctl >> 8) & 0xff); 108 buf[1] = ((if_ctl >> 8) & 0xff);
109 buf[2] = ((if_ctl >> 0) & 0xff); 109 buf[2] = ((if_ctl >> 0) & 0xff);
diff --git a/drivers/media/dvb-frontends/cxd2820r_t2.c b/drivers/media/dvb-frontends/cxd2820r_t2.c
index 9c0c4f42175c..35fe364c7182 100644
--- a/drivers/media/dvb-frontends/cxd2820r_t2.c
+++ b/drivers/media/dvb-frontends/cxd2820r_t2.c
@@ -120,7 +120,7 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe)
120 120
121 num = if_freq / 1000; /* Hz => kHz */ 121 num = if_freq / 1000; /* Hz => kHz */
122 num *= 0x1000000; 122 num *= 0x1000000;
123 if_ctl = cxd2820r_div_u64_round_closest(num, 41000); 123 if_ctl = DIV_ROUND_CLOSEST_ULL(num, 41000);
124 buf[0] = ((if_ctl >> 16) & 0xff); 124 buf[0] = ((if_ctl >> 16) & 0xff);
125 buf[1] = ((if_ctl >> 8) & 0xff); 125 buf[1] = ((if_ctl >> 8) & 0xff);
126 buf[2] = ((if_ctl >> 0) & 0xff); 126 buf[2] = ((if_ctl >> 0) & 0xff);
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c
index 0939d399b774..8aa726651630 100644
--- a/drivers/media/pci/bt8xx/bt878.c
+++ b/drivers/media/pci/bt8xx/bt878.c
@@ -416,9 +416,6 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
416 int result = 0; 416 int result = 0;
417 unsigned char lat; 417 unsigned char lat;
418 struct bt878 *bt; 418 struct bt878 *bt;
419#if defined(__powerpc__)
420 unsigned int cmd;
421#endif
422 unsigned int cardid; 419 unsigned int cardid;
423 420
424 printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", 421 printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n",
@@ -461,15 +458,6 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
461 printk("irq: %d, latency: %d, memory: 0x%lx\n", 458 printk("irq: %d, latency: %d, memory: 0x%lx\n",
462 bt->irq, lat, bt->bt878_adr); 459 bt->irq, lat, bt->bt878_adr);
463 460
464
465#if defined(__powerpc__)
466 /* on OpenFirmware machines (PowerMac at least), PCI memory cycle */
467 /* response on cards with no firmware is not enabled by OF */
468 pci_read_config_dword(dev, PCI_COMMAND, &cmd);
469 cmd = (cmd | PCI_COMMAND_MEMORY);
470 pci_write_config_dword(dev, PCI_COMMAND, cmd);
471#endif
472
473#ifdef __sparc__ 461#ifdef __sparc__
474 bt->bt878_mem = (unsigned char *) bt->bt878_adr; 462 bt->bt878_mem = (unsigned char *) bt->bt878_adr;
475#else 463#else
diff --git a/drivers/media/pci/bt8xx/bt878.h b/drivers/media/pci/bt8xx/bt878.h
index d19b59299d78..49af240b5894 100644
--- a/drivers/media/pci/bt8xx/bt878.h
+++ b/drivers/media/pci/bt8xx/bt878.h
@@ -142,18 +142,7 @@ void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin,
142 u32 irq_err_ignore); 142 u32 irq_err_ignore);
143void bt878_stop(struct bt878 *bt); 143void bt878_stop(struct bt878 *bt);
144 144
145#if defined(__powerpc__) /* big-endian */
146static inline void io_st_le32(volatile unsigned __iomem *addr, unsigned val)
147{
148 st_le32(addr, val);
149 eieio();
150}
151
152#define bmtwrite(dat,adr) io_st_le32((adr),(dat))
153#define bmtread(adr) ld_le32((adr))
154#else
155#define bmtwrite(dat,adr) writel((dat), (adr)) 145#define bmtwrite(dat,adr) writel((dat), (adr))
156#define bmtread(adr) readl(adr) 146#define bmtread(adr) readl(adr)
157#endif
158 147
159#endif 148#endif
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 4899924ea926..a30cc2f7e4f1 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -2509,7 +2509,6 @@ vpfe_get_pdata(struct platform_device *pdev)
2509 2509
2510 pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF; 2510 pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF;
2511 pdata->asd[i]->match.of.node = rem; 2511 pdata->asd[i]->match.of.node = rem;
2512 of_node_put(endpoint);
2513 of_node_put(rem); 2512 of_node_put(rem);
2514 } 2513 }
2515 2514
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 55370d74ff57..7bfe7665687f 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1708,7 +1708,6 @@ static void scan_of_host(struct soc_camera_host *ici)
1708 if (!i) 1708 if (!i)
1709 soc_of_bind(ici, epn, ren->parent); 1709 soc_of_bind(ici, epn, ren->parent);
1710 1710
1711 of_node_put(epn);
1712 of_node_put(ren); 1711 of_node_put(ren);
1713 1712
1714 if (i) { 1713 if (i) {
@@ -1716,6 +1715,8 @@ static void scan_of_host(struct soc_camera_host *ici)
1716 break; 1715 break;
1717 } 1716 }
1718 } 1717 }
1718
1719 of_node_put(epn);
1719} 1720}
1720 1721
1721#else 1722#else
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index e80f2c6c5f1a..8d77e1c4a141 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1195,16 +1195,6 @@ static struct pnp_driver ene_driver = {
1195 .shutdown = ene_shutdown, 1195 .shutdown = ene_shutdown,
1196}; 1196};
1197 1197
1198static int __init ene_init(void)
1199{
1200 return pnp_register_driver(&ene_driver);
1201}
1202
1203static void ene_exit(void)
1204{
1205 pnp_unregister_driver(&ene_driver);
1206}
1207
1208module_param(sample_period, int, S_IRUGO); 1198module_param(sample_period, int, S_IRUGO);
1209MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)"); 1199MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)");
1210 1200
@@ -1226,5 +1216,4 @@ MODULE_DESCRIPTION
1226MODULE_AUTHOR("Maxim Levitsky"); 1216MODULE_AUTHOR("Maxim Levitsky");
1227MODULE_LICENSE("GPL"); 1217MODULE_LICENSE("GPL");
1228 1218
1229module_init(ene_init); 1219module_pnp_driver(ene_driver);
1230module_exit(ene_exit);
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index b5167573240e..5c63c2ec6183 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -684,16 +684,6 @@ static struct pnp_driver fintek_driver = {
684 .shutdown = fintek_shutdown, 684 .shutdown = fintek_shutdown,
685}; 685};
686 686
687static int __init fintek_init(void)
688{
689 return pnp_register_driver(&fintek_driver);
690}
691
692static void __exit fintek_exit(void)
693{
694 pnp_unregister_driver(&fintek_driver);
695}
696
697module_param(debug, int, S_IRUGO | S_IWUSR); 687module_param(debug, int, S_IRUGO | S_IWUSR);
698MODULE_PARM_DESC(debug, "Enable debugging output"); 688MODULE_PARM_DESC(debug, "Enable debugging output");
699 689
@@ -703,5 +693,4 @@ MODULE_DESCRIPTION(FINTEK_DESCRIPTION " driver");
703MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); 693MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
704MODULE_LICENSE("GPL"); 694MODULE_LICENSE("GPL");
705 695
706module_init(fintek_init); 696module_pnp_driver(fintek_driver);
707module_exit(fintek_exit);
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 56abf9120cc2..0f301903aa6f 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1708,21 +1708,10 @@ static struct pnp_driver ite_driver = {
1708 .shutdown = ite_shutdown, 1708 .shutdown = ite_shutdown,
1709}; 1709};
1710 1710
1711static int __init ite_init(void)
1712{
1713 return pnp_register_driver(&ite_driver);
1714}
1715
1716static void __exit ite_exit(void)
1717{
1718 pnp_unregister_driver(&ite_driver);
1719}
1720
1721MODULE_DEVICE_TABLE(pnp, ite_ids); 1711MODULE_DEVICE_TABLE(pnp, ite_ids);
1722MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver"); 1712MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver");
1723 1713
1724MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>"); 1714MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>");
1725MODULE_LICENSE("GPL"); 1715MODULE_LICENSE("GPL");
1726 1716
1727module_init(ite_init); 1717module_pnp_driver(ite_driver);
1728module_exit(ite_exit);
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 9c2c8635ff33..85af7a869167 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1219,16 +1219,6 @@ static struct pnp_driver nvt_driver = {
1219 .shutdown = nvt_shutdown, 1219 .shutdown = nvt_shutdown,
1220}; 1220};
1221 1221
1222static int __init nvt_init(void)
1223{
1224 return pnp_register_driver(&nvt_driver);
1225}
1226
1227static void __exit nvt_exit(void)
1228{
1229 pnp_unregister_driver(&nvt_driver);
1230}
1231
1232module_param(debug, int, S_IRUGO | S_IWUSR); 1222module_param(debug, int, S_IRUGO | S_IWUSR);
1233MODULE_PARM_DESC(debug, "Enable debugging output"); 1223MODULE_PARM_DESC(debug, "Enable debugging output");
1234 1224
@@ -1238,5 +1228,4 @@ MODULE_DESCRIPTION("Nuvoton W83667HG-A & W83677HG-I CIR driver");
1238MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); 1228MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
1239MODULE_LICENSE("GPL"); 1229MODULE_LICENSE("GPL");
1240 1230
1241module_init(nvt_init); 1231module_pnp_driver(nvt_driver);
1242module_exit(nvt_exit);
diff --git a/drivers/media/tuners/msi001.c b/drivers/media/tuners/msi001.c
index 26019e731993..74cfc3c98edb 100644
--- a/drivers/media/tuners/msi001.c
+++ b/drivers/media/tuners/msi001.c
@@ -408,7 +408,7 @@ static int msi001_s_ctrl(struct v4l2_ctrl *ctrl)
408 s->mixer_gain->cur.val, s->if_gain->val); 408 s->mixer_gain->cur.val, s->if_gain->val);
409 break; 409 break;
410 default: 410 default:
411 dev_dbg(&s->spi->dev, "unkown control %d\n", ctrl->id); 411 dev_dbg(&s->spi->dev, "unknown control %d\n", ctrl->id);
412 ret = -EINVAL; 412 ret = -EINVAL;
413 } 413 }
414 414