Commit a0bd3e0b authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Mauro Carvalho Chehab

[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=83771Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 430e3572
...@@ -364,6 +364,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent ...@@ -364,6 +364,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
goto out; goto out;
} }
/* create a nice device name */
sprintf(dev->name, "saa7146 (%d)", saa7146_num);
DEB_EE("pci:%p\n", pci); DEB_EE("pci:%p\n", pci);
err = pci_enable_device(pci); 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,9 +441,6 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
/* the rest + print status message */ /* the rest + print status message */
/* create a nice device name */
sprintf(dev->name, "saa7146 (%d)", saa7146_num);
pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n", pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n",
dev->mem, dev->revision, pci->irq, dev->mem, dev->revision, pci->irq,
pci->subsystem_vendor, pci->subsystem_device); pci->subsystem_vendor, pci->subsystem_device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment