Re: [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
Currently it is possible to enable multiple times the smartreflex class
driver from userspace via ../smartreflex/autocomp debugfs entry. Fix this
by checking the autocomp_active state in sr_start_vddautocomp.

Signed-off-by: Jarkko Nikula<jhnikula@xxxxxxxxx>
---
Not known to cause any problems at the moment with class3 driver.
---
  arch/arm/mach-omap2/smartreflex.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 95ac336..d94894a 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -213,6 +213,9 @@ static void sr_set_regfields(struct omap_sr *sr)

  static void sr_start_vddautocomp(struct omap_sr *sr)
  {
+	if (sr->autocomp_active)
+		return;
+
  	if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
  		dev_warn(&sr->pdev->dev,
  			"%s: smartreflex class driver not registered\n",
is'nt:
http://marc.info/?l=linux-omap&m=129906344711663&w=2
better since the issue with userspace access -> debugfs?

--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux