[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition
David Woodhouse
dwmw2 at infradead.org
Tue Jul 31 07:55:32 EDT 2007
On Thu, 2007-07-26 at 17:04 -0700, Jared Hulbert wrote:
> +/*
> + * Allow other modules to get the physical address of a given partition
> + */
> +void *mtd_get_partition_physaddr(struct mtd_info *mtd)
> +{
> + struct mtd_part *part = PART(mtd);
> + struct map_info *map = part->master->priv;
> +
> + return (void *)(map->phys + part->offset);
> +}
> +EXPORT_SYMBOL_GPL(mtd_get_partition_physaddr);
The problem with this is that it expects the caller to 'know' that the
mtd device it's using is in fact a partition. If we have to do this, I'd
rather see it done generically. Jörn is probably right that it should be
available from (whatever replaces) the point() method.
--
dwmw2
More information about the linux-mtd
mailing list