Re: [RFC][PATCH] move dma_mask into struct device

From: Patrick Mansfield (patmans@us.ibm.com)
Date: Sat Nov 16 2002 - 15:33:51 EST


On Fri, Nov 15, 2002 at 03:34:12PM -0500, J.E.J. Bottomley wrote:
> --- 1.36/drivers/scsi/hosts.h Thu Nov 14 13:07:27 2002
> +++ edited/drivers/scsi/hosts.h Fri Nov 15 14:43:59 2002
> @@ -468,10 +468,10 @@
> unsigned int max_host_blocked;
>
> /*
> - * For SCSI hosts which are PCI devices, set pci_dev so that
> - * we can do BIOS EDD 3.0 mappings
> + * This is a pointer to the generic device for this host (i.e. the
> + * device on the bus);
> */
> - struct pci_dev *pci_dev;
> + struct device *dev;
>
> /*
> * Support for driverfs filesystem
> @@ -521,11 +521,17 @@
> shost->host_lock = lock;
> }
>
> +static inline void scsi_set_device(struct Scsi_Host *shost,
> + struct device *dev)
> +{
> + shost->dev = dev;
> + shost->host_driverfs_dev.parent = dev;
> +}
> +
> static inline void scsi_set_pci_device(struct Scsi_Host *shost,
> struct pci_dev *pdev)
> {
> - shost->pci_dev = pdev;
> - shost->host_driverfs_dev.parent=&pdev->dev;
> + scsi_set_device(shost, &pdev->dev);
> }

Can shost->host_driverfs_dev.parent be used instead of adding and
using a duplicate shost->dev?

-- Patrick Mansfield
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:17 EST