media: dvb: fix DVB_MMAP symbol name

CONFIG_DVB_MMAP was misspelled either as CONFIG_DVB_MMSP
or DVB_MMAP, so it had no effect at all. This fixes that,
to make it possible to build it again.

Fixes: 4021053ed5 ("media: dvb-core: make DVB mmap API optional")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Arnd Bergmann 2018-01-04 05:31:30 -05:00 committed by Mauro Carvalho Chehab
parent e77c31ed60
commit ec5b100462
3 changed files with 17 additions and 17 deletions

View File

@ -4,7 +4,7 @@
# #
dvb-net-$(CONFIG_DVB_NET) := dvb_net.o dvb-net-$(CONFIG_DVB_NET) := dvb_net.o
dvb-vb2-$(CONFIG_DVB_MMSP) := dvb_vb2.o dvb-vb2-$(CONFIG_DVB_MMAP) := dvb_vb2.o
dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o \ dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o \
dvb_ca_en50221.o dvb_frontend.o \ dvb_ca_en50221.o dvb_frontend.o \

View File

@ -128,7 +128,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv; struct dmxdev *dmxdev = dvbdev->priv;
struct dmx_frontend *front; struct dmx_frontend *front;
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
bool need_ringbuffer = false; bool need_ringbuffer = false;
#else #else
const bool need_ringbuffer = true; const bool need_ringbuffer = true;
@ -144,7 +144,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
return -ENODEV; return -ENODEV;
} }
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
if ((file->f_flags & O_ACCMODE) == O_RDONLY) if ((file->f_flags & O_ACCMODE) == O_RDONLY)
need_ringbuffer = true; need_ringbuffer = true;
#else #else
@ -200,7 +200,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv; struct dmxdev *dmxdev = dvbdev->priv;
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
bool need_ringbuffer = false; bool need_ringbuffer = false;
#else #else
const bool need_ringbuffer = true; const bool need_ringbuffer = true;
@ -213,7 +213,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
dmxdev->demux->connect_frontend(dmxdev->demux, dmxdev->demux->connect_frontend(dmxdev->demux,
dmxdev->dvr_orig_fe); dmxdev->dvr_orig_fe);
} }
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
if ((file->f_flags & O_ACCMODE) == O_RDONLY) if ((file->f_flags & O_ACCMODE) == O_RDONLY)
need_ringbuffer = true; need_ringbuffer = true;
#endif #endif
@ -426,7 +426,7 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
{ {
struct dmxdev_filter *dmxdevfilter = feed->priv; struct dmxdev_filter *dmxdevfilter = feed->priv;
struct dvb_ringbuffer *buffer; struct dvb_ringbuffer *buffer;
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
struct dvb_vb2_ctx *ctx; struct dvb_vb2_ctx *ctx;
#endif #endif
int ret; int ret;
@ -440,12 +440,12 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
if (dmxdevfilter->params.pes.output == DMX_OUT_TAP || if (dmxdevfilter->params.pes.output == DMX_OUT_TAP ||
dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP) { dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP) {
buffer = &dmxdevfilter->buffer; buffer = &dmxdevfilter->buffer;
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
ctx = &dmxdevfilter->vb2_ctx; ctx = &dmxdevfilter->vb2_ctx;
#endif #endif
} else { } else {
buffer = &dmxdevfilter->dev->dvr_buffer; buffer = &dmxdevfilter->dev->dvr_buffer;
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
ctx = &dmxdevfilter->dev->dvr_vb2_ctx; ctx = &dmxdevfilter->dev->dvr_vb2_ctx;
#endif #endif
} }
@ -1111,7 +1111,7 @@ static int dvb_demux_do_ioctl(struct file *file,
mutex_unlock(&dmxdevfilter->mutex); mutex_unlock(&dmxdevfilter->mutex);
break; break;
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
case DMX_REQBUFS: case DMX_REQBUFS:
if (mutex_lock_interruptible(&dmxdevfilter->mutex)) { if (mutex_lock_interruptible(&dmxdevfilter->mutex)) {
mutex_unlock(&dmxdev->mutex); mutex_unlock(&dmxdev->mutex);
@ -1199,7 +1199,7 @@ static __poll_t dvb_demux_poll(struct file *file, poll_table *wait)
return mask; return mask;
} }
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
static int dvb_demux_mmap(struct file *file, struct vm_area_struct *vma) static int dvb_demux_mmap(struct file *file, struct vm_area_struct *vma)
{ {
struct dmxdev_filter *dmxdevfilter = file->private_data; struct dmxdev_filter *dmxdevfilter = file->private_data;
@ -1249,7 +1249,7 @@ static const struct file_operations dvb_demux_fops = {
.release = dvb_demux_release, .release = dvb_demux_release,
.poll = dvb_demux_poll, .poll = dvb_demux_poll,
.llseek = default_llseek, .llseek = default_llseek,
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
.mmap = dvb_demux_mmap, .mmap = dvb_demux_mmap,
#endif #endif
}; };
@ -1280,7 +1280,7 @@ static int dvb_dvr_do_ioctl(struct file *file,
ret = dvb_dvr_set_buffer_size(dmxdev, arg); ret = dvb_dvr_set_buffer_size(dmxdev, arg);
break; break;
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
case DMX_REQBUFS: case DMX_REQBUFS:
ret = dvb_vb2_reqbufs(&dmxdev->dvr_vb2_ctx, parg); ret = dvb_vb2_reqbufs(&dmxdev->dvr_vb2_ctx, parg);
break; break;
@ -1322,7 +1322,7 @@ static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv; struct dmxdev *dmxdev = dvbdev->priv;
__poll_t mask = 0; __poll_t mask = 0;
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
bool need_ringbuffer = false; bool need_ringbuffer = false;
#else #else
const bool need_ringbuffer = true; const bool need_ringbuffer = true;
@ -1337,7 +1337,7 @@ static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
poll_wait(file, &dmxdev->dvr_buffer.queue, wait); poll_wait(file, &dmxdev->dvr_buffer.queue, wait);
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
if ((file->f_flags & O_ACCMODE) == O_RDONLY) if ((file->f_flags & O_ACCMODE) == O_RDONLY)
need_ringbuffer = true; need_ringbuffer = true;
#endif #endif
@ -1353,7 +1353,7 @@ static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait)
return mask; return mask;
} }
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
static int dvb_dvr_mmap(struct file *file, struct vm_area_struct *vma) static int dvb_dvr_mmap(struct file *file, struct vm_area_struct *vma)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
@ -1381,7 +1381,7 @@ static const struct file_operations dvb_dvr_fops = {
.release = dvb_dvr_release, .release = dvb_dvr_release,
.poll = dvb_dvr_poll, .poll = dvb_dvr_poll,
.llseek = default_llseek, .llseek = default_llseek,
#ifdef DVB_MMAP #ifdef CONFIG_DVB_MMAP
.mmap = dvb_dvr_mmap, .mmap = dvb_dvr_mmap,
#endif #endif
}; };

View File

@ -103,7 +103,7 @@ struct dvb_vb2_ctx {
char name[DVB_VB2_NAME_MAX + 1]; char name[DVB_VB2_NAME_MAX + 1];
}; };
#ifndef DVB_MMAP #ifndef CONFIG_DVB_MMAP
static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx, static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx,
const char *name, int non_blocking) const char *name, int non_blocking)
{ {