disp: msm: replace PTR_RET with PTR_ERR_OR_ZERO
Commit fad7c9020948 ("err.h: remove deprecated PTR_RET for good") deprecated PTR_RET. This change updates the msm driver by replacing it with PTR_ERR_OR_ZERO. Change-Id: Ibe8cefd7b9ce27dc63886eb3861aab5fc8ba268a Signed-off-by: Samantha Tran <samtran@codeaurora.org> Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:

committed by
Nilaan Gunabalachandran

parent
e199ecbfb8
commit
df3f51f9c4
@@ -78,7 +78,7 @@ static int dsi_panel_vreg_get(struct dsi_panel *panel)
|
|||||||
for (i = 0; i < panel->power_info.count; i++) {
|
for (i = 0; i < panel->power_info.count; i++) {
|
||||||
vreg = devm_regulator_get(panel->parent,
|
vreg = devm_regulator_get(panel->parent,
|
||||||
panel->power_info.vregs[i].vreg_name);
|
panel->power_info.vregs[i].vreg_name);
|
||||||
rc = PTR_RET(vreg);
|
rc = PTR_ERR_OR_ZERO(vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DSI_ERR("failed to get %s regulator\n",
|
DSI_ERR("failed to get %s regulator\n",
|
||||||
panel->power_info.vregs[i].vreg_name);
|
panel->power_info.vregs[i].vreg_name);
|
||||||
|
@@ -208,7 +208,7 @@ static int dsi_phy_supplies_init(struct platform_device *pdev,
|
|||||||
regs = &phy->pwr_info.digital;
|
regs = &phy->pwr_info.digital;
|
||||||
for (i = 0; i < regs->count; i++) {
|
for (i = 0; i < regs->count; i++) {
|
||||||
vreg = devm_regulator_get(&pdev->dev, regs->vregs[i].vreg_name);
|
vreg = devm_regulator_get(&pdev->dev, regs->vregs[i].vreg_name);
|
||||||
rc = PTR_RET(vreg);
|
rc = PTR_ERR_OR_ZERO(vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DSI_PHY_ERR(phy, "failed to get %s regulator\n",
|
DSI_PHY_ERR(phy, "failed to get %s regulator\n",
|
||||||
regs->vregs[i].vreg_name);
|
regs->vregs[i].vreg_name);
|
||||||
@@ -220,7 +220,7 @@ static int dsi_phy_supplies_init(struct platform_device *pdev,
|
|||||||
regs = &phy->pwr_info.phy_pwr;
|
regs = &phy->pwr_info.phy_pwr;
|
||||||
for (i = 0; i < regs->count; i++) {
|
for (i = 0; i < regs->count; i++) {
|
||||||
vreg = devm_regulator_get(&pdev->dev, regs->vregs[i].vreg_name);
|
vreg = devm_regulator_get(&pdev->dev, regs->vregs[i].vreg_name);
|
||||||
rc = PTR_RET(vreg);
|
rc = PTR_ERR_OR_ZERO(vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DSI_PHY_ERR(phy, "failed to get %s regulator\n",
|
DSI_PHY_ERR(phy, "failed to get %s regulator\n",
|
||||||
regs->vregs[i].vreg_name);
|
regs->vregs[i].vreg_name);
|
||||||
|
@@ -315,7 +315,7 @@ int msm_dss_get_vreg(struct device *dev, struct dss_vreg *in_vreg,
|
|||||||
curr_vreg = &in_vreg[i];
|
curr_vreg = &in_vreg[i];
|
||||||
curr_vreg->vreg = regulator_get(dev,
|
curr_vreg->vreg = regulator_get(dev,
|
||||||
curr_vreg->vreg_name);
|
curr_vreg->vreg_name);
|
||||||
rc = PTR_RET(curr_vreg->vreg);
|
rc = PTR_ERR_OR_ZERO(curr_vreg->vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: %s get failed. rc=%d\n",
|
DEV_ERR("%pS->%s: %s get failed. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
@@ -374,7 +374,7 @@ int msm_dss_enable_vreg(struct dss_vreg *in_vreg, int num_vreg, int enable)
|
|||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
for (i = 0; i < num_vreg; i++) {
|
for (i = 0; i < num_vreg; i++) {
|
||||||
rc = PTR_RET(in_vreg[i].vreg);
|
rc = PTR_ERR_OR_ZERO(in_vreg[i].vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: %s regulator error. rc=%d\n",
|
DEV_ERR("%pS->%s: %s regulator error. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
@@ -510,7 +510,7 @@ int msm_dss_get_clk(struct device *dev, struct dss_clk *clk_arry, int num_clk)
|
|||||||
|
|
||||||
for (i = 0; i < num_clk; i++) {
|
for (i = 0; i < num_clk; i++) {
|
||||||
clk_arry[i].clk = clk_get(dev, clk_arry[i].clk_name);
|
clk_arry[i].clk = clk_get(dev, clk_arry[i].clk_name);
|
||||||
rc = PTR_RET(clk_arry[i].clk);
|
rc = PTR_ERR_OR_ZERO(clk_arry[i].clk);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: '%s' get failed. rc=%d\n",
|
DEV_ERR("%pS->%s: '%s' get failed. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
|
@@ -147,7 +147,7 @@ int sde_rot_config_vreg(struct device *dev, struct sde_vreg *in_vreg,
|
|||||||
curr_vreg = &in_vreg[i];
|
curr_vreg = &in_vreg[i];
|
||||||
curr_vreg->vreg = regulator_get(dev,
|
curr_vreg->vreg = regulator_get(dev,
|
||||||
curr_vreg->vreg_name);
|
curr_vreg->vreg_name);
|
||||||
rc = PTR_RET(curr_vreg->vreg);
|
rc = PTR_ERR_OR_ZERO(curr_vreg->vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: %s get failed. rc=%d\n",
|
DEV_ERR("%pS->%s: %s get failed. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
@@ -220,7 +220,7 @@ int sde_rot_enable_vreg(struct sde_vreg *in_vreg, int num_vreg, int enable)
|
|||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
for (i = 0; i < num_vreg; i++) {
|
for (i = 0; i < num_vreg; i++) {
|
||||||
rc = PTR_RET(in_vreg[i].vreg);
|
rc = PTR_ERR_OR_ZERO(in_vreg[i].vreg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: %s regulator error. rc=%d\n",
|
DEV_ERR("%pS->%s: %s regulator error. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
@@ -313,7 +313,7 @@ int sde_rot_get_clk(struct device *dev, struct sde_clk *clk_arry, int num_clk)
|
|||||||
|
|
||||||
for (i = 0; i < num_clk; i++) {
|
for (i = 0; i < num_clk; i++) {
|
||||||
clk_arry[i].clk = clk_get(dev, clk_arry[i].clk_name);
|
clk_arry[i].clk = clk_get(dev, clk_arry[i].clk_name);
|
||||||
rc = PTR_RET(clk_arry[i].clk);
|
rc = PTR_ERR_OR_ZERO(clk_arry[i].clk);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DEV_ERR("%pS->%s: '%s' get failed. rc=%d\n",
|
DEV_ERR("%pS->%s: '%s' get failed. rc=%d\n",
|
||||||
__builtin_return_address(0), __func__,
|
__builtin_return_address(0), __func__,
|
||||||
|
Reference in New Issue
Block a user