Commit f1f3dd1
i2c: emev2: Use devm_clk_get_enabled() helpers
The devm_clk_get_enabled() helpers:
- call devm_clk_get()
- call clk_prepare_enable() and register what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code and avoids the calls to clk_disable_unprepare().
While at it, no need to save clk pointer, drop sclk from struct
em_i2c_device.
Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>1 parent d0f8e97 commit f1f3dd1
1 file changed
Lines changed: 8 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
383 | 379 | | |
384 | 380 | | |
385 | 381 | | |
| |||
397 | 393 | | |
398 | 394 | | |
399 | 395 | | |
400 | | - | |
| 396 | + | |
401 | 397 | | |
| 398 | + | |
402 | 399 | | |
403 | 400 | | |
404 | 401 | | |
405 | | - | |
| 402 | + | |
406 | 403 | | |
407 | 404 | | |
408 | | - | |
409 | 405 | | |
410 | | - | |
| 406 | + | |
411 | 407 | | |
412 | 408 | | |
413 | 409 | | |
414 | 410 | | |
415 | 411 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | 412 | | |
421 | 413 | | |
422 | 414 | | |
423 | 415 | | |
424 | 416 | | |
425 | 417 | | |
426 | 418 | | |
427 | | - | |
428 | 419 | | |
429 | 420 | | |
430 | 421 | | |
| |||
0 commit comments