Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53333
b: refs/heads/master
c: 6ba1863
h: refs/heads/master
i:
  53331: 4d8b23b
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed May 3, 2007
1 parent 2e87925 commit 5efeb90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40ee9e9f8d52d85f2446bbdda7823a3f1de62f3f
refs/heads/master: 6ba186361ed2cda7e174856a3ab8a8e3237b3c3d
6 changes: 3 additions & 3 deletions trunk/Documentation/pci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ echo "vendor device subvendor subdevice class class_mask driver_data" > \
/sys/bus/pci/drivers/{driver}/new_id

All fields are passed in as hexadecimal values (no leading 0x).
Users need pass only as many fields as necessary:
o vendor, device, subvendor, and subdevice fields default
to PCI_ANY_ID (FFFFFFFF),
The vendor and device fields are mandatory, the others are optional. Users
need pass only as many optional fields as necessary:
o subvendor and subdevice fields default to PCI_ANY_ID (FFFFFFFF)
o class and classmask fields default to 0
o driver_data defaults to 0UL.

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
{
struct pci_dynid *dynid;
struct pci_driver *pdrv = to_pci_driver(driver);
__u32 vendor=PCI_ANY_ID, device=PCI_ANY_ID, subvendor=PCI_ANY_ID,
__u32 vendor, device, subvendor=PCI_ANY_ID,
subdevice=PCI_ANY_ID, class=0, class_mask=0;
unsigned long driver_data=0;
int fields=0;
Expand All @@ -61,7 +61,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
fields = sscanf(buf, "%x %x %x %x %x %x %lux",
&vendor, &device, &subvendor, &subdevice,
&class, &class_mask, &driver_data);
if (fields < 0)
if (fields < 2)
return -EINVAL;

dynid = kzalloc(sizeof(*dynid), GFP_KERNEL);
Expand Down

0 comments on commit 5efeb90

Please sign in to comment.