Re: ARM: 6910/1: MTD: physmap: let set_vpp() pass a platform_deviceinstead of a map_info

From: Geert Uytterhoeven
Date: Wed Jun 08 2011 - 14:53:30 EST


On Tue, May 24, 2011 at 02:59, Linux Kernel Mailing List
<linux-kernel@xxxxxxxxxxxxxxx> wrote:
> Â ÂARM: 6910/1: MTD: physmap: let set_vpp() pass a platform_device instead of a map_info
>
> Â ÂThe set_vpp() method provided by physmap passes a map_info back to
> Â Âthe platform code, which has little relevance as far as the platform
> Â Âis concerned (this parameter is completely unused).
>
> Â ÂInstead, pass the platform_device, which can be used in the pismo
> Â Âdriver to retrieve some important information in a nicer way, instead
> Â Âof the hack that was in place.
>
> Â ÂThe empty set_vpp function in board-at572d940hf_ek.c is left untouched,
> Â Âas the board/SoC is scheduled for removal.
>
> Â ÂCc: Andrew Victor <linux@xxxxxxxxxxxx>
> Â ÂCc: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>
> Â ÂAcked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
> Â ÂCc: Philipp Zabel <philipp.zabel@xxxxxxxxx>
> Â ÂCc: Eric Miao <eric.y.miao@xxxxxxxxx>
> Â ÂCc: Ben Dooks <ben-linux@xxxxxxxxx>
> Â ÂAcked-by: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
> Â ÂAcked-by: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
> Â ÂSigned-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> Â ÂSigned-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>

> --- a/include/linux/mtd/physmap.h
> +++ b/include/linux/mtd/physmap.h
> @@ -24,7 +24,7 @@ struct physmap_flash_data {
>    Âunsigned int      Âwidth;
>    Âint           (*init)(struct platform_device *);
>    Âvoid          Â(*exit)(struct platform_device *);
> -    void          Â(*set_vpp)(struct map_info *, int);
> +    void          Â(*set_vpp)(struct platform_device *, int);
>    Âunsigned int      Ânr_parts;
>    Âunsigned int      Âpfow_base;
>    Âchar          Â*probe_type;

You forgot to update the set_vpp parameter of physmap_configure():

void physmap_configure(unsigned long addr, unsigned long size,
int bankwidth, void (*set_vpp)(struct map_info *, int) );

causing

drivers/mtd/maps/physmap.c: In function âphysmap_configureâ:
drivers/mtd/maps/physmap.c:255: warning: assignment from incompatible
pointer type

Interestingly, there are no (in-tree) users of physmap_configure()?

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/