Skip to content

Commit

Permalink
[media] staging: as102: Enable compilation
Browse files Browse the repository at this point in the history
Fix compilation errors in the USB driver by replacing usb_buffer_free(),
usb_buffer_alloc() with usb_free_coherent() and usb_alloc_coherent().
Add entries for the driver in parent Makefile and Kconfig.

[snjw23@gmail.com: minor edit to changelog]
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Piotr Chmura authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 3b4544a commit 9d8e18b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,6 @@ source "drivers/staging/mei/Kconfig"

source "drivers/staging/nvec/Kconfig"

source "drivers/staging/media/as102/Kconfig"

endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_DRM_PSB) += gma500/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_DVB_AS102) += media/as102/
4 changes: 2 additions & 2 deletions drivers/staging/media/as102/as102_usb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static void as102_free_usb_stream_buffer(struct as102_dev_t *dev)
for (i = 0; i < MAX_STREAM_URB; i++)
usb_free_urb(dev->stream_urb[i]);

usb_buffer_free(dev->bus_adap.usb_dev,
usb_free_coherent(dev->bus_adap.usb_dev,
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
dev->stream,
dev->dma_addr);
Expand All @@ -251,7 +251,7 @@ static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)

ENTER();

dev->stream = usb_buffer_alloc(dev->bus_adap.usb_dev,
dev->stream = usb_alloc_coherent(dev->bus_adap.usb_dev,
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
GFP_KERNEL,
&dev->dma_addr);
Expand Down

0 comments on commit 9d8e18b

Please sign in to comment.