• Rafael J. Wysocki's avatar
    PM: QoS: Redefine struct pm_qos_request and drop struct pm_qos_object · 02c92a37
    Rafael J. Wysocki authored
    First, change the definition of struct pm_qos_request so that it
    contains a struct pm_qos_constraints pointer (called "qos") instead
    of a PM QoS class number (in preparation for dropping the PM QoS
    classes concept altogether going forward) and move its definition
    (along with the definition of struct pm_qos_flags_request that does
    not change) after the definition of struct pm_qos_constraints.
    
    Next, drop the definition of struct pm_qos_object and the null_pm_qos
    and cpu_dma_pm_qos variables of that type along with pm_qos_array[]
    holding pointers to them and change the code to refer to the
    pm_qos_constraints structure directly or to use the new qos pointer
    in struct pm_qos_request for that instead of going through
    pm_qos_array[] to access it.  Also update kerneldoc comments that
    mention pm_qos_class to refer to PM_QOS_CPU_DMA_LATENCY directly
    instead.
    
    Finally, drop register_pm_qos_misc(), introduce cpu_latency_qos_miscdev
    (with the name field set to "cpu_dma_latency") to implement the
    CPU latency QoS interface in /dev/ and register it directly from
    pm_qos_power_init().
    
    After these changes the notion of PM QoS classes remains only in the
    API (in the form of redundant function parameters that are ignored)
    and in the definitions of PM QoS trace events.
    
    While at it, some redundant local variables are dropped etc.
    
    No intentional functional impact.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
    Tested-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
    02c92a37
qos.c 18.6 KB