Re: [PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-28 Thread Mauro Carvalho Chehab
Em Wed, 26 Aug 2015 11:54:03 -0300
Mauro Carvalho Chehab  escreveu:

> Em Tue, 25 Aug 2015 12:55:41 -0600
> Shuah Khan  escreveu:
> 
> > On 08/23/2015 02:17 PM, Mauro Carvalho Chehab wrote:
> > > Now that a link can be either between two different graph
> > > objects, we'll need to add more functions to create links.
> > 
> > Is this an incomplete sentence. Should it read: "either between
> > two different graph objects or two pads" ?
> 
> That would be redundant, as pad is a graph object ;)

Renamed the patch description to:

With the new API, a link can be either between two PADs or between an 
interface
and an entity. So, we need to use a better name for the function that 
create
links between two pads.

So, rename the such function to media_create_pad_link().

No functional changes.

This patch was created via this shell script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type 
f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a 
$i; done

Signed-off-by: Mauro Carvalho Chehab 
Acked-by: Hans Verkuil 

Regards,
Mauro

> 
> > 
> > > So, rename the existing one that create links only between
> > > two pads as media_create_pad_link().
> > 
> > > 
> > > No functional changes.
> > > 
> > > This patch was created via this shell script:
> > >   for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
> > > drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' 
> > > -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i 
> > > >a && mv a $i; done
> > > 
> > 
> > Didn't want to experiment with Coccinelle?? :)
> 
> I use Coccinelle, but only when I need more complex changes, as
> Coccinelle may mangle with comments.
> 
> > 
> > > Signed-off-by: Mauro Carvalho Chehab 
> > > Acked-by: Hans Verkuil 
> > > Signed-off-by: Mauro Carvalho Chehab 
> > > 
> > 
> > Changes look good to me. After fixing the commit log:
> > 
> > Acked-by: Shuah Khan 
> > 
> > thanks,
> > -- Shuah
> > 
> > 
> --
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-26 Thread Mauro Carvalho Chehab
Em Tue, 25 Aug 2015 12:55:41 -0600
Shuah Khan  escreveu:

> On 08/23/2015 02:17 PM, Mauro Carvalho Chehab wrote:
> > Now that a link can be either between two different graph
> > objects, we'll need to add more functions to create links.
> 
> Is this an incomplete sentence. Should it read: "either between
> two different graph objects or two pads" ?

That would be redundant, as pad is a graph object ;)

> 
> > So, rename the existing one that create links only between
> > two pads as media_create_pad_link().
> 
> > 
> > No functional changes.
> > 
> > This patch was created via this shell script:
> > for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
> > drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' 
> > -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a 
> > && mv a $i; done
> > 
> 
> Didn't want to experiment with Coccinelle?? :)

I use Coccinelle, but only when I need more complex changes, as
Coccinelle may mangle with comments.

> 
> > Signed-off-by: Mauro Carvalho Chehab 
> > Acked-by: Hans Verkuil 
> > Signed-off-by: Mauro Carvalho Chehab 
> > 
> 
> Changes look good to me. After fixing the commit log:
> 
> Acked-by: Shuah Khan 
> 
> thanks,
> -- Shuah
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-25 Thread Shuah Khan
On 08/23/2015 02:17 PM, Mauro Carvalho Chehab wrote:
> Now that a link can be either between two different graph
> objects, we'll need to add more functions to create links.

Is this an incomplete sentence. Should it read: "either between
two different graph objects or two pads" ?

> So, rename the existing one that create links only between
> two pads as media_create_pad_link().

> 
> No functional changes.
> 
> This patch was created via this shell script:
>   for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
> drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' 
> -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a 
> && mv a $i; done
> 

Didn't want to experiment with Coccinelle?? :)

> Signed-off-by: Mauro Carvalho Chehab 
> Acked-by: Hans Verkuil 
> Signed-off-by: Mauro Carvalho Chehab 
> 

Changes look good to me. After fixing the commit log:

Acked-by: Shuah Khan 

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shua...@osg.samsung.com | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-23 Thread Mauro Carvalho Chehab
Now that a link can be either between two different graph
objects, we'll need to add more functions to create links.
So, rename the existing one that create links only between
two pads as media_create_pad_link().

No functional changes.

This patch was created via this shell script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type 
f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a 
$i; done

Signed-off-by: Mauro Carvalho Chehab 
Acked-by: Hans Verkuil 
Signed-off-by: Mauro Carvalho Chehab 

diff --git a/Documentation/media-framework.txt 
b/Documentation/media-framework.txt
index 6903b2503577..b424de6c3bb3 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -199,7 +199,7 @@ pre-allocated and grows dynamically as needed.
 
 Drivers create links by calling
 
-   media_entity_create_link(struct media_entity *source, u16 source_pad,
+   media_create_pad_link(struct media_entity *source, u16 source_pad,
 struct media_entity *sink,   u16 sink_pad,
 u32 flags);
 
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 2fdcbb5f000a..65f59f2124b4 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap)
}
 
if (tuner && fe)
-   media_entity_create_link(tuner, 0, fe, 0, 0);
+   media_create_pad_link(tuner, 0, fe, 0, 0);
 
if (fe && demux)
-   media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux && dvr)
-   media_entity_create_link(demux, 1, dvr, 0, 
MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux && ca)
-   media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
 }
 EXPORT_SYMBOL_GPL(dvb_create_media_graph);
 #endif
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c 
b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index 6d167428727d..c81bfbfea32f 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev 
*sd)
return ret;
}
 
-   ret = media_entity_create_link(&state->sensor_sd.entity,
+   ret = media_create_pad_link(&state->sensor_sd.entity,
S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
-   ret = media_entity_create_link(&state->sensor_sd.entity,
+   ret = media_create_pad_link(&state->sensor_sd.entity,
S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 30a9ca62e034..d3bff30bcb6f 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
v4l2_err(sd, "failed to register subdev %s\n",
 state->cis_sd.name);
else
-   ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS,
+   ret = media_create_pad_link(&state->cis_sd.entity, PAD_CIS,
   &state->sd.entity, PAD_CIS,
   MEDIA_LNK_FL_IMMUTABLE |
   MEDIA_LNK_FL_ENABLED);
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
b/drivers/media/i2c/smiapp/smiapp-core.c
index 308613ea0aed..5aa49eb393a9 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
return rval;
}
 
-   rval = media_entity_create_link(&this->sd.entity,
+   rval = media_create_pad_link(&this->sd.entity,
this->source_pad,
&last->sd.entity,
last->sink_pad,
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
MEDIA_LNK_FL_IMMUTABLE);
if (rval) {
dev_err(&client->dev,
-   "media_entity_create_link failed\n");
+   "media_create_pad_link failed\n");