All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, rmk+lkml@arm.linux.org.uk
Subject: Re: [PATCH] driver core: Separate platform device name from platform device number
Date: Fri, 25 Mar 2005 20:35:35 +0200	[thread overview]
Message-ID: <20050325183534.GB4192@linux-sh.org> (raw)
In-Reply-To: <20050325181014.GA13436@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

On Fri, Mar 25, 2005 at 10:10:14AM -0800, Greg KH wrote:
> > This might make sense for devices that end in numbers, but does it really
> > make sense for devices that don't?
> 
> Then fix those drivers to not put the number in there if they don't have
> one :)
> 
But they do have non -1 ids, the device name itself just doesn't end in a
number. In this event, the delimiter makes no sense.

These drivers are expecting that you will have <devicename><id>, and
application code is expecting the same. /dev follows this convention too,
I don't see this as being an unreasonable expectation.

If anything, serial8250 is broken and should rename itself to something
not ending in a number. It's not nice when one driver exhibits a corner
case and decides to change the semantics for everyone else.

> I don't see the serial8250 driver adding that .0 to it on my machines,
> does this happen on yours?
> 
Yes, we end up having /sys/devices/platform/serial8250 and serial8250.0.
Where serial8250.0 ends up as:

drwxr-xr-x    3 0        0               0 Jan  1 00:00 .
drwxr-xr-x   18 0        0               0 Jan  1 00:00 ..
lrwxrwxrwx    1 0        0               0 Jan  1 00:00 bus -> ../../../bus/platform
-rw-r--r--    1 0        0            4096 Jan  1 00:00 detach_state
lrwxrwxrwx    1 0        0               0 Jan  1 00:00 driver -> ../../../bus/platform/drivers/serial8250
drwxr-xr-x    2 0        0               0 Jan  1 00:00 power

That doesn't really bother me, having serial8250.0 is more sensible then
serial82500. For this type of corner case the delimiter makes sense, but
not in a blanket sense.

> What userspace code are you referring to?
> 
Anything that expects that it can open a /sys/devices/platform/<device><id>
path. I have a few applications like this, I have no reason to doubt that
others do too. I don't see any reason to go out of the way to break this
convention if the end of the device name is not a number.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-03-25 18:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10  0:34 [BK PATCH] Driver core and kobject updates for 2.6.11 Greg KH
2005-03-10  0:34 ` [PATCH] Kobject: remove some unneeded exports Greg KH
2005-03-10  0:34   ` [PATCH] Add 2.4.x cpufreq /proc and sysctl interface removal feature-removal-schedule Greg KH
2005-03-10  0:34     ` [PATCH] cpufreq 2.4 interface removal schedule Greg KH
2005-03-10  0:34       ` [PATCH] driver core: Separate platform device name from platform device number Greg KH
2005-03-10  0:34         ` [PATCH] class core: export MAJOR/MINOR to the hotplug env Greg KH
2005-03-10  0:34           ` [PATCH] block " Greg KH
2005-03-10  0:34             ` [PATCH] class_simple: pass dev_t to the class core Greg KH
2005-03-10  0:34               ` [PATCH] usb: class driver " Greg KH
2005-03-10  0:34                 ` [PATCH] i2c: " Greg KH
2005-03-10  0:34                   ` [PATCH] videodev: " Greg KH
2005-03-10  0:34                     ` [PATCH] driver core: clean driver unload Greg KH
2005-03-10  0:34                       ` [PATCH] Driver core: add "bus" symlink to class/block devices Greg KH
2005-03-10  0:34                         ` [PATCH] floppy.c: pass physical device to device registration Greg KH
2005-03-10  0:34                           ` [PATCH] kset: make ksets have a spinlock, and use that to lock their lists Greg KH
2005-03-10  0:34                             ` [PATCH] sysdev: make system_subsys static as no one else needs access to it Greg KH
2005-03-10  0:34                               ` [PATCH] kref: make kref_put return if this was the last put call Greg KH
2005-03-10  0:34                                 ` [PATCH] USB: move usb core to use class_simple instead of it's own class functions Greg KH
2005-03-10  0:34                                   ` [PATCH] kmap: remove usage of rwsem from kobj_map Greg KH
2005-03-10  0:34                                     ` [PATCH] sysdev: fix the name of the list of drivers to be a sane name Greg KH
2005-03-10  0:34                                       ` [PATCH] sysdev: remove the rwsem usage from this subsystem Greg KH
2005-03-10  0:34                                         ` [PATCH] class: add a semaphore to struct class, and use that instead of the subsystem rwsem Greg KH
2005-03-25 18:01         ` [PATCH] driver core: Separate platform device name from platform device number Paul Mundt
2005-03-25 18:10           ` Greg KH
2005-03-25 18:35             ` Paul Mundt [this message]
2005-03-25 19:38               ` Kyle Moffett
2005-03-25 19:58                 ` Paul Mundt
2005-03-25 20:17                   ` Kyle Moffett
2005-03-25 20:25                   ` Russell King
2005-03-25 20:56                     ` Paul Mundt
2005-03-25 21:03                       ` Russell King
2005-03-25 22:15                         ` Paul Mundt
2005-03-10  2:23     ` [PATCH] Add 2.4.x cpufreq /proc and sysctl interface removal feature-removal-schedule Dave Jones
2005-03-10  4:56     ` Dominik Brodowski

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=20050325183534.GB4192@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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.