[PATCH v2 1/8] clk: imx: add common logic to detect early UART usage

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Sep 7 02:50:29 PDT 2015


Hallo Lucas,

On Mon, Sep 07, 2015 at 11:15:54AM +0200, Lucas Stach wrote:
> Am Montag, den 07.09.2015, 11:06 +0200 schrieb Uwe Kleine-König:
> > I wonder why you need an array of pointers to pointers of clocks. Isn't
> > one indirection less possible and more easy?
> > 
> No, this is not easily possible if we want to use the auto-discarding of
> the clocks array and a simple static initialization. The clock pointers
> are only set up after the clock drivers probe routine has run, so if I
> want to point to the actual clocks I would need to dynamically populate
> the array and either dynamically allocate it, or would need to pre-size
> the static array.
Ah right. An alternative would be to just store the indices, but I don't
think this is nicer because then you additionally need a reference to
the clk array. You don't happen to have this anyhow, do you?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list