lkml.org 
[lkml]   [2005]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver core: Add the ability to unbind drivers to devices from userspace
On 7/25/05, Jon Smirl <jonsmirl@gmail.com> wrote:
> On 7/25/05, Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> > On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> > > I just pulled from GIT to test bind/unbind. I couldn't get it to work;
> > > it isn't taking into account the CR on the end of the input value of
> > > the sysfs attribute. This patch will fix it but I'm sure there is a
> > > cleaner solution.
> > >
> >
> > "echo -n" should take care of this problem I think.
>
> That will work around it but I think we should fix it. Changing to
> strncmp() fixes most cases.
>
> - if (strcmp(name, dev->bus_id) == 0)
> + if (strncmp(name, dev->bus_id, strlen(dev->bus_id)) == 0)
>

This will produce "interesting results" if you have both "blah-1" and
"blah-10" devices on the bus.
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-25 16:57    [W:0.169 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site