Re: [PATCH v1.3 6/18] arcmsr: precise checking adapter ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -static void arcmsr_define_adapter_type(struct AdapterControlBlock *acb)
> +static bool arcmsr_define_adapter_type(struct AdapterControlBlock *acb)
>  {
>  	struct pci_dev *pdev = acb->pdev;
>  	u16 dev_id;
> +
>  	pci_read_config_word(pdev, PCI_DEVICE_ID, &dev_id);
>  	acb->dev_id = dev_id;

This is already available through pdev->device.


>  		acb->adapter_type = ACB_ADAPTER_TYPE_C;

Just store the adapter type in the pci_device_id private data field,
that way you enumerate the type in the same place the ids are added
and you'll never miss adding them to a switch value.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux