Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358576
b: refs/heads/master
c: 8eb9612
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Bryan Wu committed Feb 2, 2013
1 parent f10e665 commit 401bdc1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4c0c4705bef1134339b038872ece3705a2783e0
refs/heads/master: 8eb9612799605a7988d1c97cdc5980a5b8f04c56
8 changes: 4 additions & 4 deletions trunk/drivers/pwm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static struct pwm_chip *of_node_to_pwmchip(struct device_node *np)
}

/**
* of_pwm_request() - request a PWM via the PWM framework
* of_pwm_get() - request a PWM via the PWM framework
* @np: device node to get the PWM from
* @con_id: consumer name
*
Expand All @@ -486,8 +486,7 @@ static struct pwm_chip *of_node_to_pwmchip(struct device_node *np)
* becomes mandatory for devices that look up the PWM device via the con_id
* parameter.
*/
static struct pwm_device *of_pwm_request(struct device_node *np,
const char *con_id)
struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id)
{
struct pwm_device *pwm = NULL;
struct of_phandle_args args;
Expand Down Expand Up @@ -545,6 +544,7 @@ static struct pwm_device *of_pwm_request(struct device_node *np,

return pwm;
}
EXPORT_SYMBOL_GPL(of_pwm_get);

/**
* pwm_add_table() - register PWM device consumers
Expand Down Expand Up @@ -587,7 +587,7 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id)

/* look up via DT first */
if (IS_ENABLED(CONFIG_OF) && dev && dev->of_node)
return of_pwm_request(dev->of_node, con_id);
return of_pwm_get(dev->of_node, con_id);

/*
* We look up the provider in the static table typically provided by
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc,
const struct of_phandle_args *args);

struct pwm_device *pwm_get(struct device *dev, const char *con_id);
struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id);
void pwm_put(struct pwm_device *pwm);

struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
Expand Down Expand Up @@ -213,6 +214,12 @@ static inline struct pwm_device *pwm_get(struct device *dev,
return ERR_PTR(-ENODEV);
}

static inline struct pwm_device *of_pwm_get(struct device_node *np,
const char *con_id)
{
return ERR_PTR(-ENODEV);
}

static inline void pwm_put(struct pwm_device *pwm)
{
}
Expand Down

0 comments on commit 401bdc1

Please sign in to comment.