All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Cc: "'Richard Purdie'" <rpurdie@rpsys.net>, Jingoo Han <jg1.han@samsung.com>
Subject: Re: [PATCH 28/36] video: backlight: lcd: convert class code to use dev_groups
Date: Thu, 25 Jul 2013 10:51:02 +0900	[thread overview]
Message-ID: <000501ce88d9$6b3f62c0$41be2840$@samsung.com> (raw)
In-Reply-To: <1374703539-9705-29-git-send-email-gregkh@linuxfoundation.org>

On Thursday, July 25, 2013 7:06 AM, Greg Kroah-Hartman wrote:
> 
> The dev_attrs field of struct class is going away soon, dev_groups
> should be used instead.  This converts the video backlight lcd class
> code to use the correct field.
> 
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> 
> Richard, feel free to take this through your tree, or ACK it and I can
> take it through mine.

Hi Greg Kroah-Hartman,

I hope that it will go through your tree with my Ack.

Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> 
>  drivers/video/backlight/lcd.c | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
> index 41964a71..93cf15ef 100644
> --- a/drivers/video/backlight/lcd.c
> +++ b/drivers/video/backlight/lcd.c
> @@ -89,7 +89,7 @@ static inline void lcd_unregister_fb(struct lcd_device *ld)
>  }
>  #endif /* CONFIG_FB */
> 
> -static ssize_t lcd_show_power(struct device *dev, struct device_attribute *attr,
> +static ssize_t lcd_power_show(struct device *dev, struct device_attribute *attr,
>  		char *buf)
>  {
>  	int rc;
> @@ -105,7 +105,7 @@ static ssize_t lcd_show_power(struct device *dev, struct device_attribute *attr,
>  	return rc;
>  }
> 
> -static ssize_t lcd_store_power(struct device *dev,
> +static ssize_t lcd_power_store(struct device *dev,
>  		struct device_attribute *attr, const char *buf, size_t count)
>  {
>  	int rc;
> @@ -128,8 +128,9 @@ static ssize_t lcd_store_power(struct device *dev,
> 
>  	return rc;
>  }
> +static DEVICE_ATTR_RW(lcd_power);
> 
> -static ssize_t lcd_show_contrast(struct device *dev,
> +static ssize_t contrast_show(struct device *dev,
>  		struct device_attribute *attr, char *buf)
>  {
>  	int rc = -ENXIO;
> @@ -143,7 +144,7 @@ static ssize_t lcd_show_contrast(struct device *dev,
>  	return rc;
>  }
> 
> -static ssize_t lcd_store_contrast(struct device *dev,
> +static ssize_t contrast_store(struct device *dev,
>  		struct device_attribute *attr, const char *buf, size_t count)
>  {
>  	int rc;
> @@ -166,14 +167,16 @@ static ssize_t lcd_store_contrast(struct device *dev,
> 
>  	return rc;
>  }
> +static DEVICE_ATTR_RW(contrast);
> 
> -static ssize_t lcd_show_max_contrast(struct device *dev,
> +static ssize_t max_contrast_show(struct device *dev,
>  		struct device_attribute *attr, char *buf)
>  {
>  	struct lcd_device *ld = to_lcd_device(dev);
> 
>  	return sprintf(buf, "%d\n", ld->props.max_contrast);
>  }
> +static DEVICE_ATTR_RO(max_contrast);
> 
>  static struct class *lcd_class;
> 
> @@ -183,12 +186,13 @@ static void lcd_device_release(struct device *dev)
>  	kfree(ld);
>  }
> 
> -static struct device_attribute lcd_device_attributes[] = {
> -	__ATTR(lcd_power, 0644, lcd_show_power, lcd_store_power),
> -	__ATTR(contrast, 0644, lcd_show_contrast, lcd_store_contrast),
> -	__ATTR(max_contrast, 0444, lcd_show_max_contrast, NULL),
> -	__ATTR_NULL,
> +static struct attribute *lcd_device_attrs[] = {
> +	&dev_attr_lcd_power.attr,
> +	&dev_attr_contrast.attr,
> +	&dev_attr_max_contrast.attr,
> +	NULL,
>  };
> +ATTRIBUTE_GROUPS(lcd_device);
> 
>  /**
>   * lcd_device_register - register a new object of lcd_device class.
> @@ -344,7 +348,7 @@ static int __init lcd_class_init(void)
>  		return PTR_ERR(lcd_class);
>  	}
> 
> -	lcd_class->dev_attrs = lcd_device_attributes;
> +	lcd_class->dev_groups = lcd_device_groups;
>  	return 0;
>  }
> 
> --
> 1.8.3.rc0.20.gb99dd2e


  reply	other threads:[~2013-07-25  1:51 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 22:05 [PATCH 00/36] remove dev_attrs usage in 'struct class' Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 01/36] misc: c2port: use dev_bin_attrs instead of hand-coding it Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 02/36] mips: convert vpe_class to use dev_groups Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 03/36] bsr: convert bsr_class " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 04/36] tile: srom: convert srom_class " Greg Kroah-Hartman
2013-07-25 21:11   ` Chris Metcalf
2013-07-25 21:18     ` Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 05/36] dma: convert dma_devclass " Greg Kroah-Hartman
2013-07-25  8:40   ` Vinod Koul
2013-07-24 22:05 ` [PATCH 06/36] devfreq: convert devfreq_class " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 07/36] extcon: convert extcon_class " Greg Kroah-Hartman
2013-07-24 23:53   ` Chanwoo Choi
2013-07-24 22:05 ` [PATCH 08/36] HID: roccat: convert class code " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 09/36] ISDN: " Greg Kroah-Hartman
2013-07-26  9:38   ` Karsten Keil
2013-07-24 22:05 ` [PATCH 10/36] leds: " Greg Kroah-Hartman
2013-07-26 19:18   ` Bryan Wu
2013-07-24 22:05 ` [PATCH 11/36] v4l2: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 12/36] c2port: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 13/36] enclosure: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 14/36] PCI: " Greg Kroah-Hartman
2013-07-25 18:09   ` Bjorn Helgaas
2013-07-24 22:05 ` [PATCH 15/36] x86: wmi: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 16/36] PPS: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 17/36] PTP: " Greg Kroah-Hartman
2013-07-26  9:19   ` Richard Cochran
2013-07-24 22:05 ` [PATCH 18/36] regulator: " Greg Kroah-Hartman
2013-07-25  9:30   ` Mark Brown
2013-07-24 22:05 ` [PATCH 19/36] rtc: " Greg Kroah-Hartman
2013-07-28 13:23   ` Alessandro Zummo
2013-07-24 22:05 ` [PATCH 20/36] UIO: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 21/36] cuse: " Greg Kroah-Hartman
2013-07-26 10:11   ` Miklos Szeredi
2013-07-24 22:05 ` [PATCH 22/36] staging: comedi: " Greg Kroah-Hartman
2013-07-24 22:11   ` H Hartley Sweeten
2013-07-24 22:26     ` Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 23/36] backing-dev: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 24/36] SCSI: OSD: " Greg Kroah-Hartman
2013-07-25  8:38   ` Boaz Harrosh
2013-07-24 22:05 ` [PATCH 25/36] SCSI: sd: " Greg Kroah-Hartman
2013-07-30 16:11   ` James Bottomley
2013-07-30 19:01     ` Greg Kroah-Hartman
2013-07-30 19:22       ` James Bottomley
2013-07-24 22:05 ` [PATCH 26/36] SCSI: st: " Greg Kroah-Hartman
2013-07-30 18:27   ` James Bottomley
2013-07-30 18:27     ` James Bottomley
2013-07-31  6:03   ` Kai Mäkisara
2013-07-24 22:05 ` [PATCH 27/36] video: backlight: " Greg Kroah-Hartman
2013-07-25  1:51   ` Jingoo Han
2013-07-24 22:05 ` [PATCH 28/36] video: backlight: lcd: " Greg Kroah-Hartman
2013-07-25  1:51   ` Jingoo Han [this message]
2013-07-24 22:05 ` [PATCH 29/36] video: output: " Greg Kroah-Hartman
2013-07-26  7:38   ` Tomi Valkeinen
2013-07-24 22:05 ` [PATCH 30/36] net: core: " Greg Kroah-Hartman
2013-07-26 22:40   ` David Miller
2013-07-24 22:05 ` [PATCH 31/36] net: ieee802154: " Greg Kroah-Hartman
2013-07-26 22:40   ` David Miller
2013-07-24 22:05 ` [PATCH 32/36] net: wireless: " Greg Kroah-Hartman
2013-07-25  7:50   ` Johannes Berg
2013-07-24 22:05 ` [PATCH 33/36] net: rfkill: " Greg Kroah-Hartman
2013-07-25  7:52   ` Johannes Berg
2013-07-25  7:52     ` Johannes Berg
2013-07-24 22:05 ` [PATCH 34/36] c2port: convert class code to use bin_attrs in groups Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 35/36] hid: roccat: " Greg Kroah-Hartman
2013-07-24 22:05 ` [PATCH 36/36] pwm: convert class code to use dev_groups Greg Kroah-Hartman
2013-07-29 11:40   ` Thierry Reding

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='000501ce88d9$6b3f62c0$41be2840$@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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.