Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-07-03 Thread Enric Balletbo i Serra
Hi MyungJoo On 03/07/18 12:57, MyungJoo Ham wrote: >> @@ -988,12 +1030,13 @@ static ssize_t governor_store(struct device *dev, >> struct device_attribute *attr, >> if (ret != 1) >> return -EINVAL; >> >> -mutex_lock(&devfreq_list_lock); >> -governor = find_devfreq_governo

RE: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-07-03 Thread MyungJoo Ham
>@@ -988,12 +1030,13 @@ static ssize_t governor_store(struct device *dev, >struct device_attribute *attr, > if (ret != 1) > return -EINVAL; > >- mutex_lock(&devfreq_list_lock); >- governor = find_devfreq_governor(str_governor); >+ governor = try_then_request_gov

RE: Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-07-03 Thread MyungJoo Ham
> >> Adding to Ezequiel's point, shouldn't we take more granular lock > >> (devfreq->lock) first and then call devfreq_list_lock at the time of > >> adding to the list? > >> > > > > Not sure why we should do that. devfreq->lock should be used to > > protect the struct devfreq state, while the dev

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-07-03 Thread Enric Balletbo Serra
Hi Chanwoo, Any comments? Just a gentle ping to make sure the parallel conversation regarding the mutex didn't distract you :) Missatge de l'adreça del dia dv., 22 de juny 2018 a les 23:22: > > On 2018-06-22 22:43, Ezequiel Garcia wrote: > > Hey Akhil, > > > > On Fri, 2018-06-22 at 12:33 +0530,

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-22 Thread akhilpo
On 2018-06-22 22:43, Ezequiel Garcia wrote: Hey Akhil, On Fri, 2018-06-22 at 12:33 +0530, Akhil P Oommen wrote: On 6/22/2018 6:41 AM, Ezequiel Garcia wrote: > Hey Enric, > > On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: > > When the devfreq driver and the governor driver are

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-22 Thread Ezequiel Garcia
Hey Akhil, On Fri, 2018-06-22 at 12:33 +0530, Akhil P Oommen wrote: > On 6/22/2018 6:41 AM, Ezequiel Garcia wrote: > > Hey Enric, > > > > On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: > > > When the devfreq driver and the governor driver are built as > > > modules, > > > the ca

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-22 Thread Akhil P Oommen
On 6/22/2018 1:52 PM, Enric Balletbo i Serra wrote: Hi Ezequiel and Akhil, On 22/06/18 09:03, Akhil P Oommen wrote: On 6/22/2018 6:41 AM, Ezequiel Garcia wrote: Hey Enric, On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: When the devfreq driver and the governor driver are

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-22 Thread Enric Balletbo i Serra
Hi Ezequiel and Akhil, On 22/06/18 09:03, Akhil P Oommen wrote: > > On 6/22/2018 6:41 AM, Ezequiel Garcia wrote: >> Hey Enric, >> >> On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: >>> When the devfreq driver and the governor driver are built as modules, >>> the call to devfreq_a

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-22 Thread Akhil P Oommen
On 6/22/2018 6:41 AM, Ezequiel Garcia wrote: Hey Enric, On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: When the devfreq driver and the governor driver are built as modules, the call to devfreq_add_device() or governor_store() fails because the governor driver is not loaded a

Re: [PATCH v3] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.

2018-06-21 Thread Ezequiel Garcia
Hey Enric, On Fri, 2018-06-22 at 00:04 +0200, Enric Balletbo i Serra wrote: > When the devfreq driver and the governor driver are built as modules, > the call to devfreq_add_device() or governor_store() fails because > the > governor driver is not loaded at the time the devfreq driver loads. > The