Skip to content

Commit

Permalink
[media] saa7146: Create a device name before it's used
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lubomir Rintel authored and Mauro Carvalho Chehab committed Oct 21, 2014
1 parent 430e357 commit a0bd3e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/common/saa7146/saa7146_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
goto out;
}

/* create a nice device name */
sprintf(dev->name, "saa7146 (%d)", saa7146_num);

DEB_EE("pci:%p\n", pci);

err = pci_enable_device(pci);
Expand Down Expand Up @@ -438,9 +441,6 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent

/* 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",
dev->mem, dev->revision, pci->irq,
pci->subsystem_vendor, pci->subsystem_device);
Expand Down

0 comments on commit a0bd3e0

Please sign in to comment.