Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287067
b: refs/heads/master
c: 0215716
h: refs/heads/master
i:
  287065: dae1c31
  287063: 9767c49
v: v3
  • Loading branch information
Tony Lindgren authored and Linus Walleij committed Jan 24, 2012
1 parent 9a2f7af commit c84a775
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 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: f9d41d7cb5a3a4fe9585d47e518d779d2aef8c94
refs/heads/master: 0215716083cac67ff7ea3e3efdc9943bdb462274
14 changes: 13 additions & 1 deletion trunk/drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,12 @@ static struct dentry *debugfs_root;

static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
{
static struct dentry *device_root;
struct dentry *device_root;

device_root = debugfs_create_dir(dev_name(pctldev->dev),
debugfs_root);
pctldev->device_root = device_root;

if (IS_ERR(device_root) || !device_root) {
pr_warn("failed to create debugfs directory for %s\n",
dev_name(pctldev->dev));
Expand All @@ -529,6 +531,11 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
pinconf_init_device_debugfs(device_root, pctldev);
}

static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
{
debugfs_remove_recursive(pctldev->device_root);
}

static void pinctrl_init_debugfs(void)
{
debugfs_root = debugfs_create_dir("pinctrl", NULL);
Expand All @@ -553,6 +560,10 @@ static void pinctrl_init_debugfs(void)
{
}

static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)
{
}

#endif

/**
Expand Down Expand Up @@ -641,6 +652,7 @@ void pinctrl_unregister(struct pinctrl_dev *pctldev)
if (pctldev == NULL)
return;

pinctrl_remove_device_debugfs(pctldev);
pinmux_unhog_maps(pctldev);
/* TODO: check that no pinmuxes are still active? */
mutex_lock(&pinctrldev_list_mutex);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/pinctrl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ struct pinctrl_dev {
struct device *dev;
struct module *owner;
void *driver_data;
#ifdef CONFIG_DEBUG_FS
struct dentry *device_root;
#endif
#ifdef CONFIG_PINMUX
struct mutex pinmux_hogs_lock;
struct list_head pinmux_hogs;
Expand Down

0 comments on commit c84a775

Please sign in to comment.