@@ -1318,13 +1321,16 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)do we need to call "dev_pm_opp_put_clkname" here and in remove to release clk resource grabbed by
ÂÂÂÂÂ if (of_property_read_bool(pdev->dev.of_node, "cts-rts-swap"))
ÂÂÂÂÂÂÂÂÂ port->cts_rts_swap = true;
+ÂÂÂ port->se.opp = dev_pm_opp_set_clkname(&pdev->dev, "se");
+ÂÂÂ dev_pm_opp_of_add_table(&pdev->dev);
+
ÂÂÂÂÂ uport->private_data = drv;
ÂÂÂÂÂ platform_set_drvdata(pdev, port);
ÂÂÂÂÂ port->handle_rx = console ? handle_rx_console : handle_rx_uart;
ÂÂÂÂÂ ret = uart_add_one_port(drv, uport);
ÂÂÂÂÂ if (ret)
-ÂÂÂÂÂÂÂ return ret;
+ÂÂÂÂÂÂÂ goto err;
ÂÂÂÂÂ irq_set_status_flags(uport->irq, IRQ_NOAUTOEN);
ÂÂÂÂÂ ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr,
@@ -1332,7 +1338,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
ÂÂÂÂÂ if (ret) {
ÂÂÂÂÂÂÂÂÂ dev_err(uport->dev, "Failed to get IRQ ret %d\n", ret);
ÂÂÂÂÂÂÂÂÂ uart_remove_one_port(drv, uport);
-ÂÂÂÂÂÂÂ return ret;
+ÂÂÂÂÂÂÂ goto err;
ÂÂÂÂÂ }
ÂÂÂÂÂ /*
@@ -1349,11 +1355,14 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
ÂÂÂÂÂÂÂÂÂ if (ret) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂ device_init_wakeup(&pdev->dev, false);
ÂÂÂÂÂÂÂÂÂÂÂÂÂ uart_remove_one_port(drv, uport);
-ÂÂÂÂÂÂÂÂÂÂÂ return ret;
+ÂÂÂÂÂÂÂÂÂÂÂ goto err;
ÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂ }
ÂÂÂÂÂ return 0;
+err:
+ÂÂÂ dev_pm_opp_of_remove_table(&pdev->dev);
dev_pm_opp_set_clkname(&pdev->dev, "se");?
+ port->se.opp = dev_pm_opp_set_clkname(&pdev->dev, "se");
+ dev_pm_opp_of_add_table(&pdev->dev);