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/ | -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
