Commit a06b693
spi: mtk-snfi: Use helper function devm_clk_get_enabled()
Since commit 7ef9651 ("clk: Provide new devm_clk helpers for prepared
and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be
replaced by devm_clk_get_enabled() when driver enables (and possibly
prepares) the clocks for the whole lifetime of the device. Moreover, it is
no longer necessary to unprepare and disable the clocks explicitly.
Also, devm_clk_get_optional() and clk_prepare_enable() can now be
replaced by devm_clk_get_optional_enabled().Moreover, the two functions
mtk_snand_enable_clk() and mtk_snand_disable_clk() no longer are used,
drop them for clean code.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230823133938.1359106-20-lizetao1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 605204f commit a06b693
1 file changed
Lines changed: 9 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | 1335 | | |
1372 | 1336 | | |
1373 | 1337 | | |
| |||
1406 | 1370 | | |
1407 | 1371 | | |
1408 | 1372 | | |
1409 | | - | |
| 1373 | + | |
1410 | 1374 | | |
1411 | 1375 | | |
1412 | 1376 | | |
1413 | 1377 | | |
1414 | 1378 | | |
1415 | 1379 | | |
1416 | | - | |
| 1380 | + | |
1417 | 1381 | | |
1418 | 1382 | | |
1419 | 1383 | | |
1420 | 1384 | | |
1421 | 1385 | | |
1422 | 1386 | | |
1423 | | - | |
| 1387 | + | |
1424 | 1388 | | |
1425 | 1389 | | |
1426 | 1390 | | |
1427 | 1391 | | |
1428 | 1392 | | |
1429 | 1393 | | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | 1394 | | |
1435 | 1395 | | |
1436 | 1396 | | |
1437 | 1397 | | |
1438 | 1398 | | |
1439 | | - | |
| 1399 | + | |
1440 | 1400 | | |
1441 | 1401 | | |
1442 | 1402 | | |
1443 | 1403 | | |
1444 | 1404 | | |
1445 | | - | |
| 1405 | + | |
1446 | 1406 | | |
1447 | 1407 | | |
1448 | 1408 | | |
1449 | 1409 | | |
1450 | 1410 | | |
1451 | | - | |
| 1411 | + | |
1452 | 1412 | | |
1453 | 1413 | | |
1454 | 1414 | | |
| |||
1472 | 1432 | | |
1473 | 1433 | | |
1474 | 1434 | | |
1475 | | - | |
| 1435 | + | |
1476 | 1436 | | |
1477 | 1437 | | |
1478 | 1438 | | |
| |||
1484 | 1444 | | |
1485 | 1445 | | |
1486 | 1446 | | |
1487 | | - | |
| 1447 | + | |
1488 | 1448 | | |
1489 | 1449 | | |
1490 | 1450 | | |
| |||
1496 | 1456 | | |
1497 | 1457 | | |
1498 | 1458 | | |
1499 | | - | |
| 1459 | + | |
1500 | 1460 | | |
1501 | 1461 | | |
1502 | 1462 | | |
1503 | | - | |
1504 | | - | |
1505 | 1463 | | |
1506 | 1464 | | |
1507 | 1465 | | |
| |||
1513 | 1471 | | |
1514 | 1472 | | |
1515 | 1473 | | |
1516 | | - | |
1517 | 1474 | | |
1518 | 1475 | | |
1519 | 1476 | | |
| |||
0 commit comments