RE: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()

2013-03-15 Thread H Hartley Sweeten
On Thursday, March 14, 2013 6:58 AM, Arnd Bergmann wrote:
 On Thursday 14 March 2013, Fabio Porcedda wrote:
 This patch converts the drivers to use the
 module_platform_driver_probe() macro which makes the code smaller and
 a bit simpler.
 
 Signed-off-by: Fabio Porcedda fabio.porce...@gmail.com
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: Arnd Bergmann a...@arndb.de
 ---
  drivers/misc/atmel_pwm.c  | 12 +---
  drivers/misc/ep93xx_pwm.c | 13 +
  2 files changed, 2 insertions(+), 23 deletions(-)

 The patch itself seems fine, but there are two issues around it:

 * The PWM drivers should really get moved to drivers/pwm and converted to the 
 new
   PWM subsystem. I don't know if Hartley or Hans-Christian have plans to do
   that already.

Arnd,

Ill look at converting the ep93xx pwm driver to the PWM subsystem. The only 
issue is
the current driver exposes a sysfs interface that I think is not available in 
that subsystem.

* Regarding the use of module_platform_driver_probe, I'm a little worried about
  the interactions with deferred probing. I don't think there are any 
 regressions,
  but we should probably make people aware that one cannot return -EPROBE_DEFER
  from a platform_driver_probe function.

The ep93xx pwm driver does not need to use platform_driver_probe(). It can be 
changed
to use module_platform_driver() by just moving the .probe to the 
platform_driver. This
driver was added before module_platform_driver() was available and I used the
platform_driver_probe() thinking it would save a couple lines of code.

I'll change this in a bit. Right now I'm trying to work out why kernel 3.8 is 
not booting
on the ep93xx. I had 3.6.6 on my development board and 3.7 works fine but 3.8 
hangs
without uncompressing the kernel.

Regards,
Hartley



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media: videobuf2-dma-contig: include header for exported symbols

2012-04-24 Thread H Hartley Sweeten
Include the header to pickup the definitions of the exported symbols.

Quiets the following sparse warnings:

warning: symbol 'vb2_dma_contig_memops' was not declared. Should it be static?
warning: symbol 'vb2_dma_contig_init_ctx' was not declared. Should it be static?
warning: symbol 'vb2_dma_contig_cleanup_ctx' was not declared. Should it be 
static?

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Pawel Osciak pa...@osciak.com
Cc: Marek Szyprowski m.szyprow...@samsung.com
Cc: Kyungmin Park kyungmin.p...@samsung.com
Cc: Mauro Carvalho Chehab mche...@infradead.org

---

diff --git a/drivers/media/video/videobuf2-dma-contig.c 
b/drivers/media/video/videobuf2-dma-contig.c
index f17ad98..a1bee6c 100644
--- a/drivers/media/video/videobuf2-dma-contig.c
+++ b/drivers/media/video/videobuf2-dma-contig.c
@@ -15,6 +15,7 @@
 #include linux/dma-mapping.h
 
 #include media/videobuf2-core.h
+#include media/videobuf2-dma-contig.h
 #include media/videobuf2-memops.h
 
 struct vb2_dc_conf {
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media: videobuf2-dma-contig: quiet sparse noise about plain integer as NULL pointer

2012-04-24 Thread H Hartley Sweeten
The function vb2_dma_contig_vaddr returns a void * not an integer.

Quiets the sparse noise:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Pawel Osciak pa...@osciak.com
Cc: Marek Szyprowski m.szyprow...@samsung.com
Cc: Kyungmin Park kyungmin.p...@samsung.com
Cc: Mauro Carvalho Chehab mche...@infradead.org
---

diff --git a/drivers/media/video/videobuf2-dma-contig.c 
b/drivers/media/video/videobuf2-dma-contig.c
index f17ad98..7de6843 100644
--- a/drivers/media/video/videobuf2-dma-contig.c
+++ b/drivers/media/video/videobuf2-dma-contig.c
@@ -85,7 +85,7 @@ static void *vb2_dma_contig_vaddr(void *buf_priv)
 {
struct vb2_dc_buf *buf = buf_priv;
if (!buf)
-   return 0;
+   return NULL;
 
return buf-vaddr;
 }
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/common: remove unnecessary casts of void *

2010-01-08 Thread H Hartley Sweeten
drivers/media/common: Remove unnecessary casts of void *

void pointers do not need to be cast to other pointer types.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Michael Hunold mich...@mihu.de
Cc: Mauro Carvalho Chehab mche...@infradead.org

---

 drivers/media/common/saa7146_vbi.c   |6 +++---
 drivers/media/common/saa7146_video.c |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/common/saa7146_vbi.c 
b/drivers/media/common/saa7146_vbi.c
index 74e2b56..301a795 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -3,7 +3,7 @@
 static int vbi_pixel_to_capture = 720 * 2;
 
 static int vbi_workaround(struct saa7146_dev *dev)
-{
+{.remove_casts.hhs~
struct saa7146_vv *vv = dev-vv_data;
 
u32  *cpu;
@@ -375,7 +375,7 @@ static void vbi_init(struct saa7146_dev *dev, struct 
saa7146_vv *vv)
 
 static int vbi_open(struct saa7146_dev *dev, struct file *file)
 {
-   struct saa7146_fh *fh = (struct saa7146_fh *)file-private_data;
+   struct saa7146_fh *fh = file-private_data;
 
u32 arbtr_ctrl  = saa7146_read(dev, PCI_BT_V1);
int ret = 0;
@@ -437,7 +437,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file 
*file)
 
 static void vbi_close(struct saa7146_dev *dev, struct file *file)
 {
-   struct saa7146_fh *fh = (struct saa7146_fh *)file-private_data;
+   struct saa7146_fh *fh = file-private_data;
struct saa7146_vv *vv = dev-vv_data;
DEB_VBI((dev:%p, fh:%p\n,dev,fh));
 
diff --git a/drivers/media/common/saa7146_video.c 
b/drivers/media/common/saa7146_video.c
index becbaad..cfc8634 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1368,7 +1368,7 @@ static void video_init(struct saa7146_dev *dev, struct 
saa7146_vv *vv)
 
 static int video_open(struct saa7146_dev *dev, struct file *file)
 {
-   struct saa7146_fh *fh = (struct saa7146_fh *)file-private_data;
+   struct saa7146_fh *fh = file-private_data;
struct saa7146_format *sfmt;
 
fh-video_fmt.width = 384;
@@ -1392,7 +1392,7 @@ static int video_open(struct saa7146_dev *dev, struct 
file *file)
 
 static void video_close(struct saa7146_dev *dev, struct file *file)
 {
-   struct saa7146_fh *fh = (struct saa7146_fh *)file-private_data;
+   struct saa7146_fh *fh = file-private_data;
struct saa7146_vv *vv = dev-vv_data;
struct videobuf_queue *q = fh-video_q;
int err;
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/video/cx23885/cx23885-dvb.c: use %pM to show MAC address

2010-01-05 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Steven Toth st...@kernellabs.com
Cc: David S. Miller da...@davemloft.net

---

Repost due to merge issues.

diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
b/drivers/media/video/cx23885/cx23885-dvb.c
index e45d2df..f9243de 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -994,15 +994,8 @@ static int dvb_register(struct cx23885_tsport *port)
netup_get_card_info(dev-i2c_bus[0].i2c_adap, cinfo);
memcpy(port-frontends.adapter.proposed_mac,
cinfo.port[port-nr - 1].mac, 6);
-   printk(KERN_INFO NetUP Dual DVB-S2 CI card port%d MAC=
-   %02X:%02X:%02X:%02X:%02X:%02X\n,
-   port-nr,
-   port-frontends.adapter.proposed_mac[0],
-   port-frontends.adapter.proposed_mac[1],
-   port-frontends.adapter.proposed_mac[2],
-   port-frontends.adapter.proposed_mac[3],
-   port-frontends.adapter.proposed_mac[4],
-   port-frontends.adapter.proposed_mac[5]);
+   printk(KERN_INFO NetUP Dual DVB-S2 CI card port%d MAC=%pM\n,
+   port-nr, port-frontends.adapter.proposed_mac);
 
netup_ci_init(port);
break;
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address

2010-01-05 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address and mask.

The only difference in the output is that the output is shown in
the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: David S. Miller da...@davemloft.net

---

Repost due to merge issues.

diff --git a/drivers/media/dvb/dvb-core/dvb_net.c 
b/drivers/media/dvb/dvb-core/dvb_net.c
index 8b8558f..da6552d 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -949,11 +949,8 @@ static int dvb_net_filter_sec_set(struct net_device *dev,
(*secfilter)-filter_mask[10] = mac_mask[1];
(*secfilter)-filter_mask[11]=mac_mask[0];
 
-   dprintk(%s: filter mac=%02x %02x %02x %02x %02x %02x\n,
-  dev-name, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-   dprintk(%s: filter mask=%02x %02x %02x %02x %02x %02x\n,
-  dev-name, mac_mask[0], mac_mask[1], mac_mask[2],
-  mac_mask[3], mac_mask[4], mac_mask[5]);
+   dprintk(%s: filter mac=%pM\n, dev-name, mac);
+   dprintk(%s: filter mask=%pM\n, dev-name, mac_mask);
 
return 0;
 }
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/video/tveeprom.c: use %pM to show MAC address

2010-01-05 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: David S. Miller da...@davemloft.net

---

Repost due to merge issues.

diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index d533ea5..0a87749 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -680,10 +680,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, 
struct tveeprom *tvee,
tveeprom_info(Hauppauge model %d, rev %s, serial# %d\n,
tvee-model, tvee-rev_str, tvee-serial_number);
if (tvee-has_MAC_address == 1)
-   tveeprom_info(MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n,
-   tvee-MAC_address[0], tvee-MAC_address[1],
-   tvee-MAC_address[2], tvee-MAC_address[3],
-   tvee-MAC_address[4], tvee-MAC_address[5]);
+   tveeprom_info(MAC address is %pM\n, tvee-MAC_address);
tveeprom_info(tuner model is %s (idx %d, type %d)\n,
t_name1, tuner1, tvee-tuner_type);
tveeprom_info(TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n,
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/video/tveeprom.c: use %pM to show MAC address

2009-12-30 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com

---

diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index d533ea5..0a87749 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -680,10 +680,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, 
struct tveeprom *tvee,
tveeprom_info(Hauppauge model %d, rev %s, serial# %d\n,
tvee-model, tvee-rev_str, tvee-serial_number);
if (tvee-has_MAC_address == 1)
-   tveeprom_info(MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n,
-   tvee-MAC_address[0], tvee-MAC_address[1],
-   tvee-MAC_address[2], tvee-MAC_address[3],
-   tvee-MAC_address[4], tvee-MAC_address[5]);
+   tveeprom_info(MAC address is %pM\n, tvee-MAC_address);
tveeprom_info(tuner model is %s (idx %d, type %d)\n,
t_name1, tuner1, tvee-tuner_type);
tveeprom_info(TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n, 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/video/cx23885/cx23885-dvb.c: use %pM to show MAC address

2009-12-30 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Steven Toth st...@kernellabs.com

---

diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
b/drivers/media/video/cx23885/cx23885-dvb.c
index e45d2df..f9243de 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -994,15 +994,8 @@ static int dvb_register(struct cx23885_tsport *port)
netup_get_card_info(dev-i2c_bus[0].i2c_adap, cinfo);
memcpy(port-frontends.adapter.proposed_mac,
cinfo.port[port-nr - 1].mac, 6);
-   printk(KERN_INFO NetUP Dual DVB-S2 CI card port%d MAC=
-   %02X:%02X:%02X:%02X:%02X:%02X\n,
-   port-nr,
-   port-frontends.adapter.proposed_mac[0],
-   port-frontends.adapter.proposed_mac[1],
-   port-frontends.adapter.proposed_mac[2],
-   port-frontends.adapter.proposed_mac[3],
-   port-frontends.adapter.proposed_mac[4],
-   port-frontends.adapter.proposed_mac[5]);
+   printk(KERN_INFO NetUP Dual DVB-S2 CI card port%d MAC=%pM\n,
+   port-nr, port-frontends.adapter.proposed_mac);
 
netup_ci_init(port);
break; 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address

2009-12-30 Thread H Hartley Sweeten
Use the %pM kernel extension to display the MAC address and mask.

The only difference in the output is that the output is shown in
the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: David S. Miller da...@davemloft.net

---

diff --git a/drivers/media/dvb/dvb-core/dvb_net.c 
b/drivers/media/dvb/dvb-core/dvb_net.c
index 8b8558f..da6552d 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -949,11 +949,8 @@ static int dvb_net_filter_sec_set(struct net_device *dev,
(*secfilter)-filter_mask[10] = mac_mask[1];
(*secfilter)-filter_mask[11]=mac_mask[0];
 
-   dprintk(%s: filter mac=%02x %02x %02x %02x %02x %02x\n,
-  dev-name, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-   dprintk(%s: filter mask=%02x %02x %02x %02x %02x %02x\n,
-  dev-name, mac_mask[0], mac_mask[1], mac_mask[2],
-  mac_mask[3], mac_mask[4], mac_mask[5]);
+   dprintk(%s: filter mac=%pM\n, dev-name, mac);
+   dprintk(%s: filter mask=%pM\n, dev-name, mac_mask);
 
return 0;
 } 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html