On 02/14, Pierre-Louis Bossart wrote: > On 2/14/17 1:04 PM, Stephen Boyd wrote: > > > >This leaks an alias when the driver is removed. Honestly, > >clk_add_alias() doesn't work well because of that problem. Can > >you just add another lookup with the pointer you already have > >instead of passing a NULL device to do a global lookup? > > This is a builtin driver that cannot be configured as a module, is > the leaked alias problematic? Well we don't suppress driver unbinding via sysfs here, unless I missed something, so the leak could be triggered that way. > I don't mind trying something different but I am not familiar enough > with the framework to understand what you are hinting at. Are you > suggesting a change on the last parameter such as: > > clk_add_alias("mclk", dev_name(&pdev->dev), "pmc_plt_clk_3", &pdev->dev) > I mean: lookup = clkdev_hw_create(data->clks[3].hw, "mclk", NULL); and then freeing that lookup with clkdev_drop in the remove of the driver. "mclk" is really generic for a connection name without an associated device id, so you may want to pass some device as the last argument here, but dev_name(&pdev->dev) seems odd because that's the clock controller device, not whatever device would be calling clk_get() with this created lookup in mind. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel