File tree Expand file tree Collapse file tree 1 file changed +19
-34
lines changed Expand file tree Collapse file tree 1 file changed +19
-34
lines changed Original file line number Diff line number Diff line change @@ -1487,55 +1487,40 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)
1487
1487
{
1488
1488
int ret ;
1489
1489
1490
- if (gpu -> clk_reg ) {
1491
- ret = clk_prepare_enable (gpu -> clk_reg );
1492
- if (ret )
1493
- return ret ;
1494
- }
1490
+ ret = clk_prepare_enable (gpu -> clk_reg );
1491
+ if (ret )
1492
+ return ret ;
1495
1493
1496
- if (gpu -> clk_bus ) {
1497
- ret = clk_prepare_enable (gpu -> clk_bus );
1498
- if (ret )
1499
- goto disable_clk_reg ;
1500
- }
1494
+ ret = clk_prepare_enable (gpu -> clk_bus );
1495
+ if (ret )
1496
+ goto disable_clk_reg ;
1501
1497
1502
- if (gpu -> clk_core ) {
1503
- ret = clk_prepare_enable (gpu -> clk_core );
1504
- if (ret )
1505
- goto disable_clk_bus ;
1506
- }
1498
+ ret = clk_prepare_enable (gpu -> clk_core );
1499
+ if (ret )
1500
+ goto disable_clk_bus ;
1507
1501
1508
- if (gpu -> clk_shader ) {
1509
- ret = clk_prepare_enable (gpu -> clk_shader );
1510
- if (ret )
1511
- goto disable_clk_core ;
1512
- }
1502
+ ret = clk_prepare_enable (gpu -> clk_shader );
1503
+ if (ret )
1504
+ goto disable_clk_core ;
1513
1505
1514
1506
return 0 ;
1515
1507
1516
1508
disable_clk_core :
1517
- if (gpu -> clk_core )
1518
- clk_disable_unprepare (gpu -> clk_core );
1509
+ clk_disable_unprepare (gpu -> clk_core );
1519
1510
disable_clk_bus :
1520
- if (gpu -> clk_bus )
1521
- clk_disable_unprepare (gpu -> clk_bus );
1511
+ clk_disable_unprepare (gpu -> clk_bus );
1522
1512
disable_clk_reg :
1523
- if (gpu -> clk_reg )
1524
- clk_disable_unprepare (gpu -> clk_reg );
1513
+ clk_disable_unprepare (gpu -> clk_reg );
1525
1514
1526
1515
return ret ;
1527
1516
}
1528
1517
1529
1518
static int etnaviv_gpu_clk_disable (struct etnaviv_gpu * gpu )
1530
1519
{
1531
- if (gpu -> clk_shader )
1532
- clk_disable_unprepare (gpu -> clk_shader );
1533
- if (gpu -> clk_core )
1534
- clk_disable_unprepare (gpu -> clk_core );
1535
- if (gpu -> clk_bus )
1536
- clk_disable_unprepare (gpu -> clk_bus );
1537
- if (gpu -> clk_reg )
1538
- clk_disable_unprepare (gpu -> clk_reg );
1520
+ clk_disable_unprepare (gpu -> clk_shader );
1521
+ clk_disable_unprepare (gpu -> clk_core );
1522
+ clk_disable_unprepare (gpu -> clk_bus );
1523
+ clk_disable_unprepare (gpu -> clk_reg );
1539
1524
1540
1525
return 0 ;
1541
1526
}
You can’t perform that action at this time.
0 commit comments