> -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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to