Re: [PATCH V2] mmc: core: cd_label must be last entry of mmc_gpio struct

From: Fabio Estevam
Date: Mon Jul 02 2018 - 20:59:35 EST


Hi Linus,

On Mon, Jul 2, 2018 at 8:42 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> What about this:
>
> From facb3799f479bfd4dad99c25c9c5d4c77b14c9b0 Mon Sep 17 00:00:00 2001
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Date: Mon, 2 Jul 2018 13:35:01 +0200
> Subject: [PATCH] mmc: slot-gpio: Allocate GPIO labels dynamically
>
> The use of string pointers in the MMC slot GPIO context is
> pretty dubious, allocating some 2*len extra bytes for each
> label of the ro and wp pins.
>
> Tidy this up using kasprintf() with dynamic allocation of
> labels for these strings.
>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Your proposed solution also worked fine, thanks.