Commit 3e282487 authored by Federico Vaga's avatar Federico Vaga

spec: assign a name to the spec

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 9ae2ee65
......@@ -144,6 +144,9 @@ static int spec_probe(struct pci_dev *pdev,
if (ret)
goto out_unmap;
snprintf(spec->name, SPEC_NAME_LEN, "spec-%04x",
spec->pdev->bus->number << 8 | spec->pdev->devfn);
/* Done */
pci_set_drvdata(pdev, spec);
return 0;
......
......@@ -22,6 +22,8 @@
#define SPEC_DEFAULT_LM32_ADDR 0x80000 /* used if "1" is passed */
#define SPEC_NAME_LEN 10
/* Our device structure */
struct spec_dev {
struct pci_dev *pdev;
......@@ -35,6 +37,8 @@ struct spec_dev {
struct gpio_chip *gpio;
struct vic_irq_controller *vic;
spinlock_t irq_lock;
char name[SPEC_NAME_LEN];
};
#define SPEC_FLAG_FAKE_EEPROM 0x00000001
......
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