Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c646c9c5 authored by Arjun Singh's avatar Arjun Singh
Browse files

soc: qcom: bgcom: free the allocated resources on device shutdown



Free driver resources on device shutdown.

Change-Id: I616f9942c0fc90df4ead4b43f2ee7ee9a8f2b53d
Signed-off-by: default avatarArjun Singh <arsingh@codeaurora.org>
parent 051d33e7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1035,6 +1035,11 @@ static int bg_spi_remove(struct spi_device *spi)
	return 0;
}

static void bg_spi_shutdown(struct spi_device *spi)
{
	bg_spi_remove(spi);
}

static int bgcom_pm_suspend(struct device *dev)
{
	uint32_t cmnd_reg = 0;
@@ -1089,6 +1094,7 @@ static struct spi_driver bg_spi_driver = {
	},
	.probe = bg_spi_probe,
	.remove = bg_spi_remove,
	.shutdown = bg_spi_shutdown,
};

module_spi_driver(bg_spi_driver);