aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2014-10-02 10:19:15 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-21 06:51:44 -0400
commita0bd3e0b31500251876da505295834e73f33f6f8 (patch)
tree3097420b522158fe2c40f882094c986734377939 /drivers/media
parent430e35724bf008742a211d4c18a9b2dff1f61a86 (diff)
[media] saa7146: Create a device name before it's used
request_irq() uses it, tries to create a procfs file with an empty name otherwise. Link: https://bugzilla.kernel.org/show_bug.cgi?id=83771 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/saa7146/saa7146_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/common/saa7146/saa7146_core.c b/drivers/media/common/saa7146/saa7146_core.c
index 97afee672d07..4418119cf707 100644
--- a/drivers/media/common/saa7146/saa7146_core.c
+++ b/drivers/media/common/saa7146/saa7146_core.c
@@ -364,6 +364,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
364 goto out; 364 goto out;
365 } 365 }
366 366
367 /* create a nice device name */
368 sprintf(dev->name, "saa7146 (%d)", saa7146_num);
369
367 DEB_EE("pci:%p\n", pci); 370 DEB_EE("pci:%p\n", pci);
368 371
369 err = pci_enable_device(pci); 372 err = pci_enable_device(pci);
@@ -438,9 +441,6 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
438 441
439 /* the rest + print status message */ 442 /* the rest + print status message */
440 443
441 /* create a nice device name */
442 sprintf(dev->name, "saa7146 (%d)", saa7146_num);
443
444 pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n", 444 pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n",
445 dev->mem, dev->revision, pci->irq, 445 dev->mem, dev->revision, pci->irq,
446 pci->subsystem_vendor, pci->subsystem_device); 446 pci->subsystem_vendor, pci->subsystem_device);