diff mbox

[REVIEW,19/42] s2250-loader: use usbv2_cypress_load_firmware

Message ID 400666fef6bc62079f4ebd7122196c753039aaad.1363000605.git.hans.verkuil@cisco.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans Verkuil March 11, 2013, 11:45 a.m. UTC
From: Hans Verkuil <hans.verkuil@cisco.com>

The v2 of this function doesn't do DMA to objects on the stack like
its predecessor does.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/staging/media/go7007/Makefile       |    4 ++--
 drivers/staging/media/go7007/s2250-loader.c |    7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Mauro Carvalho Chehab March 24, 2013, 3:39 p.m. UTC | #1
Em Mon, 11 Mar 2013 12:45:57 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The v2 of this function doesn't do DMA to objects on the stack like
> its predecessor does.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  drivers/staging/media/go7007/Makefile       |    4 ++--
>  drivers/staging/media/go7007/s2250-loader.c |    7 ++++---
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/media/go7007/Makefile b/drivers/staging/media/go7007/Makefile
> index 5bed78b..f9c8e0f 100644
> --- a/drivers/staging/media/go7007/Makefile
> +++ b/drivers/staging/media/go7007/Makefile
> @@ -11,8 +11,8 @@ s2250-y := s2250-board.o
>  #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
>  #ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
>  
> -# S2250 needs cypress ezusb loader from dvb-usb
> -ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb
> +# S2250 needs cypress ezusb loader from dvb-usb-v2
> +ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb-v2

Please don't do it like that. Ok, for now it is in staging,
but once you move it outside it, please move the cypress load firmware
code to drivers/media/common, and do the proper changes for it to be
shared between go7007 and dvb-usb-v2.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Antti Palosaari March 24, 2013, 3:49 p.m. UTC | #2
On 03/24/2013 05:39 PM, Mauro Carvalho Chehab wrote:
> Em Mon, 11 Mar 2013 12:45:57 +0100
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
>
>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> The v2 of this function doesn't do DMA to objects on the stack like
>> its predecessor does.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> ---
>>   drivers/staging/media/go7007/Makefile       |    4 ++--
>>   drivers/staging/media/go7007/s2250-loader.c |    7 ++++---
>>   2 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/staging/media/go7007/Makefile b/drivers/staging/media/go7007/Makefile
>> index 5bed78b..f9c8e0f 100644
>> --- a/drivers/staging/media/go7007/Makefile
>> +++ b/drivers/staging/media/go7007/Makefile
>> @@ -11,8 +11,8 @@ s2250-y := s2250-board.o
>>   #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
>>   #ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
>>
>> -# S2250 needs cypress ezusb loader from dvb-usb
>> -ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb
>> +# S2250 needs cypress ezusb loader from dvb-usb-v2
>> +ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb-v2
>
> Please don't do it like that. Ok, for now it is in staging,
> but once you move it outside it, please move the cypress load firmware
> code to drivers/media/common, and do the proper changes for it to be
> shared between go7007 and dvb-usb-v2.

I agree with Mauro, you could move it to the common as it is nothing DVB 
USB only related.

Acked-by: Antti Palosaari <crope@iki.fi>

regards
Antti
Hans Verkuil March 25, 2013, 8:56 a.m. UTC | #3
On Sun March 24 2013 16:39:24 Mauro Carvalho Chehab wrote:
> Em Mon, 11 Mar 2013 12:45:57 +0100
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> 
> > From: Hans Verkuil <hans.verkuil@cisco.com>
> > 
> > The v2 of this function doesn't do DMA to objects on the stack like
> > its predecessor does.
> > 
> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> > ---
> >  drivers/staging/media/go7007/Makefile       |    4 ++--
> >  drivers/staging/media/go7007/s2250-loader.c |    7 ++++---
> >  2 files changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/staging/media/go7007/Makefile b/drivers/staging/media/go7007/Makefile
> > index 5bed78b..f9c8e0f 100644
> > --- a/drivers/staging/media/go7007/Makefile
> > +++ b/drivers/staging/media/go7007/Makefile
> > @@ -11,8 +11,8 @@ s2250-y := s2250-board.o
> >  #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
> >  #ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
> >  
> > -# S2250 needs cypress ezusb loader from dvb-usb
> > -ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb
> > +# S2250 needs cypress ezusb loader from dvb-usb-v2
> > +ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb-v2
> 
> Please don't do it like that. Ok, for now it is in staging,
> but once you move it outside it, please move the cypress load firmware
> code to drivers/media/common, and do the proper changes for it to be
> shared between go7007 and dvb-usb-v2.

It's a good idea to move this to common. I'll do that.

Regards,

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

Patch

diff --git a/drivers/staging/media/go7007/Makefile b/drivers/staging/media/go7007/Makefile
index 5bed78b..f9c8e0f 100644
--- a/drivers/staging/media/go7007/Makefile
+++ b/drivers/staging/media/go7007/Makefile
@@ -11,8 +11,8 @@  s2250-y := s2250-board.o
 #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
 #ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
 
-# S2250 needs cypress ezusb loader from dvb-usb
-ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb
+# S2250 needs cypress ezusb loader from dvb-usb-v2
+ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/usb/dvb-usb-v2
 
 ccflags-y += -Idrivers/media/dvb-frontends
 ccflags-y += -Idrivers/media/dvb-core
diff --git a/drivers/staging/media/go7007/s2250-loader.c b/drivers/staging/media/go7007/s2250-loader.c
index 72e5175..6453ec0 100644
--- a/drivers/staging/media/go7007/s2250-loader.c
+++ b/drivers/staging/media/go7007/s2250-loader.c
@@ -19,7 +19,8 @@ 
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
-#include <dvb-usb.h>
+#include <linux/firmware.h>
+#include <cypress_firmware.h>
 
 #define S2250_LOADER_FIRMWARE	"s2250_loader.fw"
 #define S2250_FIRMWARE		"s2250.fw"
@@ -104,7 +105,7 @@  static int s2250loader_probe(struct usb_interface *interface,
 			S2250_LOADER_FIRMWARE);
 		goto failed2;
 	}
-	ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
+	ret = usbv2_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
 	release_firmware(fw);
 	if (0 != ret) {
 		dev_err(&interface->dev, "loader download failed\n");
@@ -117,7 +118,7 @@  static int s2250loader_probe(struct usb_interface *interface,
 			S2250_FIRMWARE);
 		goto failed2;
 	}
-	ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
+	ret = usbv2_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
 	release_firmware(fw);
 	if (0 != ret) {
 		dev_err(&interface->dev, "firmware_s2250 download failed\n");