From e4d5b2d5a633249309d2ad5975301706925a14e4 Mon Sep 17 00:00:00 2001 From: Santosh Mardi Date: Wed, 27 Jun 2018 15:26:06 +0530 Subject: [PATCH] PM / devfreq: Disallow bind/unbind in devbw and simple-dev For simple-dev and devbw platform driver does not support the manual bind / unbind feature through sysfs, when the governor is registered and started. Suppress the bind / unbind calls using driver attribute. Change-Id: Ide843476bdc3870c48f6557097ee549e7a794a22 Signed-off-by: Santosh Mardi --- drivers/devfreq/devfreq_devbw.c | 3 ++- drivers/devfreq/devfreq_simple_dev.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq_devbw.c b/drivers/devfreq/devfreq_devbw.c index 5c7959c23ad2..5bc4db43e618 100644 --- a/drivers/devfreq/devfreq_devbw.c +++ b/drivers/devfreq/devfreq_devbw.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014, 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -258,6 +258,7 @@ static struct platform_driver devbw_driver = { .driver = { .name = "devbw", .of_match_table = devbw_match_table, + .suppress_bind_attrs = true, }, }; diff --git a/drivers/devfreq/devfreq_simple_dev.c b/drivers/devfreq/devfreq_simple_dev.c index b0757b647f5b..8566e98af079 100644 --- a/drivers/devfreq/devfreq_simple_dev.c +++ b/drivers/devfreq/devfreq_simple_dev.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2014-2015, 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015, 2017-2018, The Linux Foundation. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -212,6 +213,7 @@ static struct platform_driver devfreq_clock_driver = { .driver = { .name = "devfreq-simple-dev", .of_match_table = devfreq_simple_match_table, + .suppress_bind_attrs = true, }, }; module_platform_driver(devfreq_clock_driver);