All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: sawant@ti.com
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] omap2plus: smartreflex: remove sr debug directory in omap_sr_remove()
Date: Wed, 09 Mar 2011 15:42:18 -0800	[thread overview]
Message-ID: <87fwqvvp2d.fsf@ti.com> (raw)
In-Reply-To: <1297958250-13612-1-git-send-email-sawant@ti.com> (sawant@ti.com's message of "Thu, 17 Feb 2011 21:27:30 +0530")

sawant@ti.com writes:

> From: Anand S Sawant <sawant@ti.com>
>
> omap_sr_probe() creates the smartreflex debug directory and its
> underlying nvalue debug directory. These directories are removed in
> omap_sr_remove().
>
> Basic smartreflex functionality tested on OMAP3630 Zoom3 & OMAP4430 SDP
>
> Signed-off-by: Anand S Sawant <sawant@ti.com>

Thanks, queuing for 2.6.39 (branch: for_2.6.39/pm-misc)

Kevin

> ---
> Rebased on the latest Kevin's pm branch 
> (commit id: b6fb54bc4bfc396a9b982d76c1c954c974290a1a)
>
>  arch/arm/mach-omap2/smartreflex.c |   23 +++++++++++++----------
>  1 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index a1f532e..dc19f17 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -54,6 +54,7 @@ struct omap_sr {
>  	struct list_head		node;
>  	struct omap_sr_nvalue_table	*nvalue_table;
>  	struct voltagedomain		*voltdm;
> +	struct dentry			*dbg_dir;
>  };
>  
>  /* sr_list contains all the instances of smartreflex module */
> @@ -822,7 +823,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>  	struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL);
>  	struct omap_sr_data *pdata = pdev->dev.platform_data;
>  	struct resource *mem, *irq;
> -	struct dentry *vdd_dbg_dir, *dbg_dir, *nvalue_dir;
> +	struct dentry *vdd_dbg_dir, *nvalue_dir;
>  	struct omap_volt_data *volt_data;
>  	int i, ret = 0;
>  
> @@ -895,23 +896,23 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>  	if (!vdd_dbg_dir)
>  		return -EINVAL;
>  
> -	dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
> -	if (IS_ERR(dbg_dir)) {
> +	sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
> +	if (IS_ERR(sr_info->dbg_dir)) {
>  		dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
>  			__func__);
> -		return PTR_ERR(dbg_dir);
> +		return PTR_ERR(sr_info->dbg_dir);
>  	}
>  
> -	(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
> -				(void *)sr_info, &pm_sr_fops);
> -	(void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
> +			sr_info->dbg_dir, (void *)sr_info, &pm_sr_fops);
> +	(void) debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_weight);
> -	(void) debugfs_create_x32("errmaxlimit", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_maxlimit);
> -	(void) debugfs_create_x32("errminlimit", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_x32("errminlimit", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_minlimit);
>  
> -	nvalue_dir = debugfs_create_dir("nvalue", dbg_dir);
> +	nvalue_dir = debugfs_create_dir("nvalue", sr_info->dbg_dir);
>  	if (IS_ERR(nvalue_dir)) {
>  		dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
>  			"for n-values\n", __func__);
> @@ -975,6 +976,8 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
>  
>  	if (sr_info->autocomp_active)
>  		sr_stop_vddautocomp(sr_info);
> +	if (sr_info->dbg_dir)
> +		debugfs_remove_recursive(sr_info->dbg_dir);
>  
>  	list_del(&sr_info->node);
>  	iounmap(sr_info->base);

WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] omap2plus: smartreflex: remove sr debug directory in omap_sr_remove()
Date: Wed, 09 Mar 2011 15:42:18 -0800	[thread overview]
Message-ID: <87fwqvvp2d.fsf@ti.com> (raw)
In-Reply-To: <1297958250-13612-1-git-send-email-sawant@ti.com> (sawant@ti.com's message of "Thu, 17 Feb 2011 21:27:30 +0530")

sawant at ti.com writes:

> From: Anand S Sawant <sawant@ti.com>
>
> omap_sr_probe() creates the smartreflex debug directory and its
> underlying nvalue debug directory. These directories are removed in
> omap_sr_remove().
>
> Basic smartreflex functionality tested on OMAP3630 Zoom3 & OMAP4430 SDP
>
> Signed-off-by: Anand S Sawant <sawant@ti.com>

Thanks, queuing for 2.6.39 (branch: for_2.6.39/pm-misc)

Kevin

> ---
> Rebased on the latest Kevin's pm branch 
> (commit id: b6fb54bc4bfc396a9b982d76c1c954c974290a1a)
>
>  arch/arm/mach-omap2/smartreflex.c |   23 +++++++++++++----------
>  1 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index a1f532e..dc19f17 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -54,6 +54,7 @@ struct omap_sr {
>  	struct list_head		node;
>  	struct omap_sr_nvalue_table	*nvalue_table;
>  	struct voltagedomain		*voltdm;
> +	struct dentry			*dbg_dir;
>  };
>  
>  /* sr_list contains all the instances of smartreflex module */
> @@ -822,7 +823,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>  	struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL);
>  	struct omap_sr_data *pdata = pdev->dev.platform_data;
>  	struct resource *mem, *irq;
> -	struct dentry *vdd_dbg_dir, *dbg_dir, *nvalue_dir;
> +	struct dentry *vdd_dbg_dir, *nvalue_dir;
>  	struct omap_volt_data *volt_data;
>  	int i, ret = 0;
>  
> @@ -895,23 +896,23 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>  	if (!vdd_dbg_dir)
>  		return -EINVAL;
>  
> -	dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
> -	if (IS_ERR(dbg_dir)) {
> +	sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
> +	if (IS_ERR(sr_info->dbg_dir)) {
>  		dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
>  			__func__);
> -		return PTR_ERR(dbg_dir);
> +		return PTR_ERR(sr_info->dbg_dir);
>  	}
>  
> -	(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
> -				(void *)sr_info, &pm_sr_fops);
> -	(void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
> +			sr_info->dbg_dir, (void *)sr_info, &pm_sr_fops);
> +	(void) debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_weight);
> -	(void) debugfs_create_x32("errmaxlimit", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_maxlimit);
> -	(void) debugfs_create_x32("errminlimit", S_IRUGO, dbg_dir,
> +	(void) debugfs_create_x32("errminlimit", S_IRUGO, sr_info->dbg_dir,
>  			&sr_info->err_minlimit);
>  
> -	nvalue_dir = debugfs_create_dir("nvalue", dbg_dir);
> +	nvalue_dir = debugfs_create_dir("nvalue", sr_info->dbg_dir);
>  	if (IS_ERR(nvalue_dir)) {
>  		dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
>  			"for n-values\n", __func__);
> @@ -975,6 +976,8 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
>  
>  	if (sr_info->autocomp_active)
>  		sr_stop_vddautocomp(sr_info);
> +	if (sr_info->dbg_dir)
> +		debugfs_remove_recursive(sr_info->dbg_dir);
>  
>  	list_del(&sr_info->node);
>  	iounmap(sr_info->base);

  reply	other threads:[~2011-03-09 23:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 15:57 [PATCH] omap2plus: smartreflex: remove sr debug directory in omap_sr_remove() sawant
2011-02-17 15:57 ` sawant at ti.com
2011-03-09 23:42 ` Kevin Hilman [this message]
2011-03-09 23:42   ` Kevin Hilman
  -- strict thread matches above, loose matches on Subject: below --
2011-02-05 13:32 Anand S Sawant
2011-02-11 23:50 ` Kevin Hilman
2011-02-15  5:26   ` Sawant, Anand
2011-02-15 16:06     ` Kevin Hilman
2011-02-17 16:09       ` Sawant, Anand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwqvvp2d.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sawant@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.