public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] treewide: rename dev_info variables to something else
       [not found] <20100304232928.2e45bdd1.akpm@linux-foundation.org>
@ 2010-04-05 19:05 ` Joe Perches
  2010-04-05 19:05   ` [PATCH 09/11] pvrusb2-v4l2: Rename dev_info to pdi Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2010-04-05 19:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tony Luck, Fenghua Yu, Mark Gross, Doug Thompson, Mike Isely,
	Mauro Carvalho Chehab, Martin Schwidefsky, Heiko Carstens,
	linux390, Greg Kroah-Hartman, David Vrabel, linux-ia64,
	linux-kernel, bluesmoke-devel, linux-media, linux-s390, devel,
	linux-usb, netdev

There is a macro called dev_info that prints struct device specific
information.  Having variables with the same name can be confusing and
prevents conversion of the macro to a function.

Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.

Joe Perches (11):
  arch/ia64/hp/common/sba_iommu.c: Rename dev_info to adi
  drivers/usb/host/hwa-hc.c: Rename dev_info to hdi
  drivers/usb/wusbcore/wusbhc.h: Remove unused dev_info from struct wusb_port
  drivers/s390/block/dcssblk.c: Rename dev_info to ddi
  drivers/edac/amd: Rename dev_info to adi
  drivers/edac/cpc925_edac.c: Rename dev_info to cdi
  drivers/edac/e7*_edac.c: Rename dev_info to edi
  drivers/staging/iio: Rename dev_info to idi
  pvrusb2-v4l2: Rename dev_info to pdi
  drivers/char/mem.c: Rename dev_info to bdi
  drivers/uwb: Rename dev_info to wdi

 arch/ia64/hp/common/sba_iommu.c            |    8 +-
 drivers/char/mem.c                         |    6 +-
 drivers/edac/amd8111_edac.c                |   88 ++++----
 drivers/edac/amd8131_edac.c                |   86 ++++----
 drivers/edac/cpc925_edac.c                 |  122 +++++-----
 drivers/edac/e752x_edac.c                  |   18 +-
 drivers/edac/e7xxx_edac.c                  |    8 +-
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |   22 +-
 drivers/s390/block/dcssblk.c               |  328 ++++++++++++++--------------
 drivers/staging/iio/accel/lis3l02dq_core.c |    4 +-
 drivers/staging/iio/accel/lis3l02dq_ring.c |   20 +-
 drivers/staging/iio/accel/sca3000_core.c   |   24 +-
 drivers/staging/iio/adc/max1363_core.c     |   36 ++--
 drivers/staging/iio/adc/max1363_ring.c     |    6 +-
 drivers/staging/iio/chrdev.h               |    2 +-
 drivers/staging/iio/iio.h                  |   54 +++---
 drivers/staging/iio/industrialio-core.c    |  232 ++++++++++----------
 drivers/staging/iio/industrialio-ring.c    |   38 ++--
 drivers/staging/iio/industrialio-trigger.c |   34 ++--
 drivers/staging/iio/ring_generic.h         |    4 +-
 drivers/staging/iio/trigger_consumer.h     |   16 +-
 drivers/usb/host/hwa-hc.c                  |   18 +-
 drivers/usb/wusbcore/wusbhc.h              |   10 -
 drivers/uwb/i1480/i1480u-wlp/lc.c          |   16 +-
 drivers/uwb/wlp/messages.c                 |   40 ++--
 drivers/uwb/wlp/sysfs.c                    |   46 ++--
 drivers/uwb/wlp/wlp-lc.c                   |   12 +-
 27 files changed, 644 insertions(+), 654 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 09/11] pvrusb2-v4l2: Rename dev_info to pdi
  2010-04-05 19:05 ` [PATCH 00/11] treewide: rename dev_info variables to something else Joe Perches
@ 2010-04-05 19:05   ` Joe Perches
  2010-04-10 16:57     ` Mike Isely
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2010-04-05 19:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Isely, Mauro Carvalho Chehab, linux-media, linux-kernel

There is a macro called dev_info that prints struct device specific
information.  Having variables with the same name can be confusing and
prevents conversion of the macro to a function.

Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index cc8ddb2..ba32c91 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -48,7 +48,7 @@ struct pvr2_v4l2_dev {
 
 struct pvr2_v4l2_fh {
 	struct pvr2_channel channel;
-	struct pvr2_v4l2_dev *dev_info;
+	struct pvr2_v4l2_dev *pdi;
 	enum v4l2_priority prio;
 	struct pvr2_ioread *rhp;
 	struct file *file;
@@ -161,7 +161,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 {
 	struct pvr2_v4l2_fh *fh = file->private_data;
 	struct pvr2_v4l2 *vp = fh->vhead;
-	struct pvr2_v4l2_dev *dev_info = fh->dev_info;
+	struct pvr2_v4l2_dev *pdi = fh->pdi;
 	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
 	long ret = -EINVAL;
 
@@ -563,14 +563,14 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 
 	case VIDIOC_STREAMON:
 	{
-		if (!fh->dev_info->stream) {
+		if (!fh->pdi->stream) {
 			/* No stream defined for this node.  This means
 			   that we're not currently allowed to stream from
 			   this node. */
 			ret = -EPERM;
 			break;
 		}
-		ret = pvr2_hdw_set_stream_type(hdw,dev_info->config);
+		ret = pvr2_hdw_set_stream_type(hdw,pdi->config);
 		if (ret < 0) return ret;
 		ret = pvr2_hdw_set_streaming(hdw,!0);
 		break;
@@ -578,7 +578,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 
 	case VIDIOC_STREAMOFF:
 	{
-		if (!fh->dev_info->stream) {
+		if (!fh->pdi->stream) {
 			/* No stream defined for this node.  This means
 			   that we're not currently allowed to stream from
 			   this node. */
@@ -1031,7 +1031,7 @@ static int pvr2_v4l2_open(struct file *file)
 	}
 
 	init_waitqueue_head(&fhp->wait_data);
-	fhp->dev_info = dip;
+	fhp->pdi = dip;
 
 	pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
 	pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
@@ -1112,7 +1112,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
 	struct pvr2_hdw *hdw;
 	if (fh->rhp) return 0;
 
-	if (!fh->dev_info->stream) {
+	if (!fh->pdi->stream) {
 		/* No stream defined for this node.  This means that we're
 		   not currently allowed to stream from this node. */
 		return -EPERM;
@@ -1121,21 +1121,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
 	/* First read() attempt.  Try to claim the stream and start
 	   it... */
 	if ((ret = pvr2_channel_claim_stream(&fh->channel,
-					     fh->dev_info->stream)) != 0) {
+					     fh->pdi->stream)) != 0) {
 		/* Someone else must already have it */
 		return ret;
 	}
 
-	fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream);
+	fh->rhp = pvr2_channel_create_mpeg_stream(fh->pdi->stream);
 	if (!fh->rhp) {
 		pvr2_channel_claim_stream(&fh->channel,NULL);
 		return -ENOMEM;
 	}
 
 	hdw = fh->channel.mc_head->hdw;
-	sp = fh->dev_info->stream->stream;
+	sp = fh->pdi->stream->stream;
 	pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
-	pvr2_hdw_set_stream_type(hdw,fh->dev_info->config);
+	pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
 	if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
 	return pvr2_ioread_set_enabled(fh->rhp,!0);
 }
-- 
1.7.0.3.311.g6a6955


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/11] pvrusb2-v4l2: Rename dev_info to pdi
  2010-04-05 19:05   ` [PATCH 09/11] pvrusb2-v4l2: Rename dev_info to pdi Joe Perches
@ 2010-04-10 16:57     ` Mike Isely
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Isely @ 2010-04-10 16:57 UTC (permalink / raw)
  To: Joe Perches
  Cc: Andrew Morton, Mauro Carvalho Chehab, linux-media,
	Linux Kernel Mailing List, Mike Isely


Acked-By: Mike Isely <isely@pobox.com>

  -Mike


On Mon, 5 Apr 2010, Joe Perches wrote:

> There is a macro called dev_info that prints struct device specific
> information.  Having variables with the same name can be confusing and
> prevents conversion of the macro to a function.
> 
> Rename the existing dev_info variables to something else in preparation
> to converting the dev_info macro to a function.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/media/video/pvrusb2/pvrusb2-v4l2.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
> index cc8ddb2..ba32c91 100644
> --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
> +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
> @@ -48,7 +48,7 @@ struct pvr2_v4l2_dev {
>  
>  struct pvr2_v4l2_fh {
>  	struct pvr2_channel channel;
> -	struct pvr2_v4l2_dev *dev_info;
> +	struct pvr2_v4l2_dev *pdi;
>  	enum v4l2_priority prio;
>  	struct pvr2_ioread *rhp;
>  	struct file *file;
> @@ -161,7 +161,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>  {
>  	struct pvr2_v4l2_fh *fh = file->private_data;
>  	struct pvr2_v4l2 *vp = fh->vhead;
> -	struct pvr2_v4l2_dev *dev_info = fh->dev_info;
> +	struct pvr2_v4l2_dev *pdi = fh->pdi;
>  	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
>  	long ret = -EINVAL;
>  
> @@ -563,14 +563,14 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>  
>  	case VIDIOC_STREAMON:
>  	{
> -		if (!fh->dev_info->stream) {
> +		if (!fh->pdi->stream) {
>  			/* No stream defined for this node.  This means
>  			   that we're not currently allowed to stream from
>  			   this node. */
>  			ret = -EPERM;
>  			break;
>  		}
> -		ret = pvr2_hdw_set_stream_type(hdw,dev_info->config);
> +		ret = pvr2_hdw_set_stream_type(hdw,pdi->config);
>  		if (ret < 0) return ret;
>  		ret = pvr2_hdw_set_streaming(hdw,!0);
>  		break;
> @@ -578,7 +578,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>  
>  	case VIDIOC_STREAMOFF:
>  	{
> -		if (!fh->dev_info->stream) {
> +		if (!fh->pdi->stream) {
>  			/* No stream defined for this node.  This means
>  			   that we're not currently allowed to stream from
>  			   this node. */
> @@ -1031,7 +1031,7 @@ static int pvr2_v4l2_open(struct file *file)
>  	}
>  
>  	init_waitqueue_head(&fhp->wait_data);
> -	fhp->dev_info = dip;
> +	fhp->pdi = dip;
>  
>  	pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
>  	pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
> @@ -1112,7 +1112,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
>  	struct pvr2_hdw *hdw;
>  	if (fh->rhp) return 0;
>  
> -	if (!fh->dev_info->stream) {
> +	if (!fh->pdi->stream) {
>  		/* No stream defined for this node.  This means that we're
>  		   not currently allowed to stream from this node. */
>  		return -EPERM;
> @@ -1121,21 +1121,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
>  	/* First read() attempt.  Try to claim the stream and start
>  	   it... */
>  	if ((ret = pvr2_channel_claim_stream(&fh->channel,
> -					     fh->dev_info->stream)) != 0) {
> +					     fh->pdi->stream)) != 0) {
>  		/* Someone else must already have it */
>  		return ret;
>  	}
>  
> -	fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream);
> +	fh->rhp = pvr2_channel_create_mpeg_stream(fh->pdi->stream);
>  	if (!fh->rhp) {
>  		pvr2_channel_claim_stream(&fh->channel,NULL);
>  		return -ENOMEM;
>  	}
>  
>  	hdw = fh->channel.mc_head->hdw;
> -	sp = fh->dev_info->stream->stream;
> +	sp = fh->pdi->stream->stream;
>  	pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
> -	pvr2_hdw_set_stream_type(hdw,fh->dev_info->config);
> +	pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
>  	if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
>  	return pvr2_ioread_set_enabled(fh->rhp,!0);
>  }
> 

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-10 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100304232928.2e45bdd1.akpm@linux-foundation.org>
2010-04-05 19:05 ` [PATCH 00/11] treewide: rename dev_info variables to something else Joe Perches
2010-04-05 19:05   ` [PATCH 09/11] pvrusb2-v4l2: Rename dev_info to pdi Joe Perches
2010-04-10 16:57     ` Mike Isely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox