We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d8175a commit c2b1509Copy full SHA for c2b1509
drivers/mfd/ti_am335x_tscadc.c
@@ -209,14 +209,13 @@ static int ti_tscadc_probe(struct platform_device *pdev)
209
* The TSC_ADC_SS controller design assumes the OCP clock is
210
* at least 6x faster than the ADC clock.
211
*/
212
- clk = clk_get(&pdev->dev, "adc_tsc_fck");
+ clk = devm_clk_get(&pdev->dev, "adc_tsc_fck");
213
if (IS_ERR(clk)) {
214
dev_err(&pdev->dev, "failed to get TSC fck\n");
215
err = PTR_ERR(clk);
216
goto err_disable_clk;
217
}
218
clock_rate = clk_get_rate(clk);
219
- clk_put(clk);
220
tscadc->clk_div = clock_rate / ADC_CLK;
221
222
/* TSCADC_CLKDIV needs to be configured to the value minus 1 */
0 commit comments