Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3007703d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontends



The multifrontend changes on cx88 assumed that all boards that use cx88-mpeg
supports DVB. This is not true. There also a few analog-only boards based on
Blackboard design that also uses cx88-mpeg. For those boards, there's no need
to allocate dvb frontends.

This patch fixes videobuf allocation for those devices.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9212a572
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3044,7 +3044,7 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)

	memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));

	if (!core->board.num_frontends)
	if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
		core->board.num_frontends = 1;

	info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
+2 −6
Original line number Diff line number Diff line
@@ -785,11 +785,6 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
	if (!core->board.mpeg)
		goto fail_core;

	if (!core->board.num_frontends) {
		printk(KERN_ERR "%s() .num_frontends should be non-zero, err = %d\n", __func__, err);
		goto fail_core;
	}

	err = -ENOMEM;
	dev = kzalloc(sizeof(*dev),GFP_KERNEL);
	if (NULL == dev)
@@ -808,6 +803,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
	mutex_init(&dev->frontends.lock);
	INIT_LIST_HEAD(&dev->frontends.felist);

	if (core->board.num_frontends)
		printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends);

	for (i = 1; i <= core->board.num_frontends; i++) {