linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tomas Hlavacek <tmshlvck@gmail.com>
Cc: alan@linux.intel.com, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, marek.vasut@gmail.com
Subject: Re: [PATCHv4 1/1] [RFC] uartclk from serial_core exposed to sysfs
Date: Wed, 5 Sep 2012 13:36:41 -0700	[thread overview]
Message-ID: <20120905203641.GA21427@kroah.com> (raw)
In-Reply-To: <1345401285-14473-1-git-send-email-tmshlvck@gmail.com>

On Sun, Aug 19, 2012 at 08:34:45PM +0200, Tomas Hlavacek wrote:
> Added file /sys/devices/.../tty/ttySX/uartclk to allow reading
> uartclk value in struct uart_port in serial_core via sysfs.
> 
> It simplifies initialization verification of no-name cards that
> have non-standard oscillator speed while having no distinguishing
> PCI IDs to allow autodetection.
> 
> tty_register_device() has been generalized and refactored in order
> to add support for setting drvdata and attribute_group to the device.
> 
> Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>

This looks good, but it doesn't apply to my tty-next branch in
linux-next, so I can't apply it.

But, when you redo it, here's one tiny thing to change:

> +/**
> + *	tty_register_device_attr - register a tty device
> + *	@driver: the tty driver that describes the tty device
> + *	@index: the index in the tty driver for this tty device
> + *	@device: a struct device that is associated with this tty device.
> + *		This field is optional, if there is no known struct device
> + *		for this tty device it can be set to NULL safely.
> + *	@drvdata: Driver data to be set to device (NULL = do not touch).
> + *	@attr_grp: Attribute group to be set on device (NULL = do not touch).

No need to mention the NULL thing here, "do not touch" doesn't mean
much to me.

> +	if (attr_grp)
> +		dev->groups = attr_grp;
> +	if (drvdata)
> +		dev_set_drvdata(dev, drvdata);

No need to test for NULL, just set them, it can't really hurt, right?

thanks,

greg k-h

  parent reply	other threads:[~2012-09-05 20:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEB7QLAJXkK6NDPVDi36n_U_X_DGh5niHJhH6FpqBUZFmXQ2Xg@mail.gmail.com>
2012-08-14  7:35 ` [PATCH 1/1] [RFC] uartclk from serial_core exposed to sysfs Tomas Hlavacek
2012-08-14 12:50   ` Marek Vasut
2012-08-15 17:09     ` Tomas Hlavacek
2012-08-15 17:12   ` [PATCHv2 " Tomas Hlavacek
2012-08-16 10:31   ` [PATCH " Alan Cox
2012-08-17 14:43   ` [PATCHv3 " Tomas Hlavacek
2012-08-17 15:06     ` Greg KH
2012-08-17 16:30       ` Tomas Hlavacek
2012-08-17 16:54         ` Greg KH
2012-08-17 18:44           ` Marek Vasut
2012-08-17 19:01             ` Greg KH
2012-08-17 20:25               ` Tomas Hlavacek
2012-08-19 18:34   ` [PATCHv4 " Tomas Hlavacek
2012-08-21 13:24     ` Tomas Hlavacek
2012-08-21 13:44       ` Alan Cox
2012-09-05 20:36     ` Greg KH [this message]
2012-09-05 23:16   ` [PATCHv5 1/1] uartclk value " Tomas Hlavacek
2012-09-05 23:42     ` Greg KH
2012-09-06  1:01       ` Tomas Hlavacek
2012-09-06  1:17   ` [PATCH v6] " Tomas Hlavacek
2012-09-06 16:23     ` [PATCH v6] tty: " Greg KH
2012-09-06 17:54     ` [PATCH v6] " Jiri Slaby
2012-09-06 18:39       ` Tomas Hlavacek
2012-09-06 18:54         ` Jiri Slaby
2012-09-06 19:41           ` Tomas Hlavacek
2012-09-06 19:47             ` Jiri Slaby

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=20120905203641.GA21427@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=tmshlvck@gmail.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;
as well as URLs for NNTP newsgroup(s).