]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP2+: powerdomain.c: Remove some unused functions
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 7 Dec 2014 13:58:27 +0000 (14:58 +0100)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Jan 2015 17:53:51 +0000 (09:53 -0800)
Removes some functions that are not used anywhere:
pwrdm_get_voltdm() pwrdm_for_each_clkdm() pwrdm_del_clkdm()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h

index 7fb033eca0a5affb3eb63681aa9ee56b0ad9b3a7..6bd6025716eac20f88098fb433e6a50155585279 100644 (file)
@@ -483,87 +483,6 @@ pac_exit:
        return ret;
 }
 
-/**
- * pwrdm_del_clkdm - remove a clockdomain from a powerdomain
- * @pwrdm: struct powerdomain * to add the clockdomain to
- * @clkdm: struct clockdomain * to associate with a powerdomain
- *
- * Dissociate the clockdomain @clkdm from the powerdomain
- * @pwrdm. Returns -EINVAL if presented with invalid pointers; -ENOENT
- * if @clkdm was not associated with the powerdomain, or 0 upon
- * success.
- */
-int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
-{
-       int ret = -EINVAL;
-       int i;
-
-       if (!pwrdm || !clkdm)
-               return -EINVAL;
-
-       pr_debug("powerdomain: %s: dissociating clockdomain %s\n",
-                pwrdm->name, clkdm->name);
-
-       for (i = 0; i < PWRDM_MAX_CLKDMS; i++)
-               if (pwrdm->pwrdm_clkdms[i] == clkdm)
-                       break;
-
-       if (i == PWRDM_MAX_CLKDMS) {
-               pr_debug("powerdomain: %s: clkdm %s not associated?!\n",
-                        pwrdm->name, clkdm->name);
-               ret = -ENOENT;
-               goto pdc_exit;
-       }
-
-       pwrdm->pwrdm_clkdms[i] = NULL;
-
-       ret = 0;
-
-pdc_exit:
-       return ret;
-}
-
-/**
- * pwrdm_for_each_clkdm - call function on each clkdm in a pwrdm
- * @pwrdm: struct powerdomain * to iterate over
- * @fn: callback function *
- *
- * Call the supplied function @fn for each clockdomain in the powerdomain
- * @pwrdm.  The callback function can return anything but 0 to bail
- * out early from the iterator.  Returns -EINVAL if presented with
- * invalid pointers; or passes along the last return value of the
- * callback function, which should be 0 for success or anything else
- * to indicate failure.
- */
-int pwrdm_for_each_clkdm(struct powerdomain *pwrdm,
-                        int (*fn)(struct powerdomain *pwrdm,
-                                  struct clockdomain *clkdm))
-{
-       int ret = 0;
-       int i;
-
-       if (!fn)
-               return -EINVAL;
-
-       for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++)
-               if (pwrdm->pwrdm_clkdms[i])
-                       ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]);
-
-       return ret;
-}
-
-/**
- * pwrdm_get_voltdm - return a ptr to the voltdm that this pwrdm resides in
- * @pwrdm: struct powerdomain *
- *
- * Return a pointer to the struct voltageomain that the specified powerdomain
- * @pwrdm exists in.
- */
-struct voltagedomain *pwrdm_get_voltdm(struct powerdomain *pwrdm)
-{
-       return pwrdm->voltdm.ptr;
-}
-
 /**
  * pwrdm_get_mem_bank_count - get number of memory banks in this powerdomain
  * @pwrdm: struct powerdomain *
index 11bd4dd7d8d61d3bdd7f7236a3a2f42fd3583ffc..28a796ce07d7302aed19ce7e5ae25fcbbdb584df 100644 (file)
@@ -212,11 +212,6 @@ int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),
                        void *user);
 
 int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
-int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
-int pwrdm_for_each_clkdm(struct powerdomain *pwrdm,
-                        int (*fn)(struct powerdomain *pwrdm,
-                                  struct clockdomain *clkdm));
-struct voltagedomain *pwrdm_get_voltdm(struct powerdomain *pwrdm);
 
 int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm);