Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Bryan Wu' <cooloney@gmail.com>,
	'Daniel Jeong' <gshark.jeong@gmail.com>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	'Jean-Christophe Plagniol-Villard' <plagnioj@jcrosoft.com>,
	'Tomi Valkeinen' <tomi.valkeinen@ti.com>
Subject: Re: [PATCH] backlight: lm3639: use devm_backlight_device_register()
Date: Fri, 14 Mar 2014 10:44:21 +0000	[thread overview]
Message-ID: <20140314104421.GC3432@lee--X1> (raw)
In-Reply-To: <000901cf3f2c$3af30630$b0d91290$%han@samsung.com>

> > 
> >  change to use devm_backlight_device_register() for simple cleanup.
> > 
> > Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
> 
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> 
> Lee Jones,
> Would you merge this patch into your backlight tree?

Applied with Jingoo's Ack.

> > ---
> >  drivers/video/backlight/lm3639_bl.c |   17 +++++++----------
> >  1 file changed, 7 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c
> > index 6fd60ad..5f36808 100644
> > --- a/drivers/video/backlight/lm3639_bl.c
> > +++ b/drivers/video/backlight/lm3639_bl.c
> > @@ -349,8 +349,9 @@ static int lm3639_probe(struct i2c_client *client,
> >  	props.brightness = pdata->init_brt_led;
> >  	props.max_brightness = pdata->max_brt_led;
> >  	pchip->bled > > -	    backlight_device_register("lm3639_bled", pchip->dev, pchip,
> > -				      &lm3639_bled_ops, &props);
> > +	    devm_backlight_device_register(pchip->dev, "lm3639_bled",
> > +					   pchip->dev, pchip, &lm3639_bled_ops,
> > +					   &props);
> >  	if (IS_ERR(pchip->bled)) {
> >  		dev_err(&client->dev, "fail : backlight register\n");
> >  		ret = PTR_ERR(pchip->bled);
> > @@ -360,7 +361,7 @@ static int lm3639_probe(struct i2c_client *client,
> >  	ret = device_create_file(&(pchip->bled->dev), &dev_attr_bled_mode);
> >  	if (ret < 0) {
> >  		dev_err(&client->dev, "failed : add sysfs entries\n");
> > -		goto err_bled_mode;
> > +		goto err_out;
> >  	}
> > 
> >  	/* flash */
> > @@ -391,8 +392,6 @@ err_torch:
> >  	led_classdev_unregister(&pchip->cdev_flash);
> >  err_flash:
> >  	device_remove_file(&(pchip->bled->dev), &dev_attr_bled_mode);
> > -err_bled_mode:
> > -	backlight_device_unregister(pchip->bled);
> >  err_out:
> >  	return ret;
> >  }
> > @@ -407,10 +406,8 @@ static int lm3639_remove(struct i2c_client *client)
> >  		led_classdev_unregister(&pchip->cdev_torch);
> >  	if (&pchip->cdev_flash)
> >  		led_classdev_unregister(&pchip->cdev_flash);
> > -	if (pchip->bled) {
> > +	if (pchip->bled)
> >  		device_remove_file(&(pchip->bled->dev), &dev_attr_bled_mode);
> > -		backlight_device_unregister(pchip->bled);
> > -	}
> >  	return 0;
> >  }
> > 
> > @@ -432,6 +429,6 @@ static struct i2c_driver lm3639_i2c_driver = {
> >  module_i2c_driver(lm3639_i2c_driver);
> > 
> >  MODULE_DESCRIPTION("Texas Instruments Backlight+Flash LED driver for LM3639");
> > -MODULE_AUTHOR("Daniel Jeong <daniel.jeong@ti.com>");
> > -MODULE_AUTHOR("G.Shark Jeong <gshark.jeong@gmail.com>");
> > +MODULE_AUTHOR("Daniel Jeong <gshark.jeong@gmail.com>");
> > +MODULE_AUTHOR("Ldd Mlp <ldd-mlp@list.ti.com>");
> >  MODULE_LICENSE("GPL v2");
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2014-03-14 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14  2:14 [PATCH] backlight: lm3639: use devm_backlight_device_register() Daniel Jeong
2014-03-14  2:22 ` Jingoo Han
2014-03-14 10:44   ` Lee Jones [this message]

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=20140314104421.GC3432@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=cooloney@gmail.com \
    --cc=gshark.jeong@gmail.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox