* [PATCH] i2c_intel_mid: Fix slash in sysfs name
@ 2010-12-14 15:29 Alan Cox
[not found] ` <20101214152849.7265.93628.stgit-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2010-12-14 15:29 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
This gets caught by the new sanity check code. Instead of the slash use a
different symbol. This was originally found by Major Lee who proposed a
rather more complex patch which changed the name according to the chip
type.
On the basis that we are in a late -rc and making Linus grumpy isn't always
a good idea (however fun) this is a simple alternative.
Signed-off-by: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/i2c/busses/i2c-intel-mid.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c
index 657f314..da4bbdd 100644
--- a/drivers/i2c/busses/i2c-intel-mid.c
+++ b/drivers/i2c/busses/i2c-intel-mid.c
@@ -1035,7 +1035,7 @@ static int __devinit intel_mid_i2c_probe(struct pci_dev *dev,
/* Initialize struct members */
snprintf(mrst->adap.name, sizeof(mrst->adap.name),
- "MRST/Medfield I2C at %lx", start);
+ "Intel MID I2C at %lx", start);
mrst->adap.owner = THIS_MODULE;
mrst->adap.algo = &intel_mid_i2c_algorithm;
mrst->adap.dev.parent = &dev->dev;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c_intel_mid: Fix slash in sysfs name
[not found] ` <20101214152849.7265.93628.stgit-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
@ 2010-12-15 9:08 ` Jean Delvare
[not found] ` <20101215100815.44fb8b83-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2010-12-15 9:08 UTC (permalink / raw)
To: Alan Cox
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
Hi Alan,
On Tue, 14 Dec 2010 15:29:08 +0000, Alan Cox wrote:
> From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>
> This gets caught by the new sanity check code.
New sanity check of what? Where's the code?
> Instead of the slash use a
> different symbol. This was originally found by Major Lee who proposed a
> rather more complex patch which changed the name according to the chip
> type.
>
> On the basis that we are in a late -rc and making Linus grumpy isn't always
> a good idea (however fun) this is a simple alternative.
>
> Signed-off-by: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
>
> drivers/i2c/busses/i2c-intel-mid.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c
> index 657f314..da4bbdd 100644
> --- a/drivers/i2c/busses/i2c-intel-mid.c
> +++ b/drivers/i2c/busses/i2c-intel-mid.c
> @@ -1035,7 +1035,7 @@ static int __devinit intel_mid_i2c_probe(struct pci_dev *dev,
>
> /* Initialize struct members */
> snprintf(mrst->adap.name, sizeof(mrst->adap.name),
> - "MRST/Medfield I2C at %lx", start);
> + "Intel MID I2C at %lx", start);
> mrst->adap.owner = THIS_MODULE;
> mrst->adap.algo = &intel_mid_i2c_algorithm;
> mrst->adap.dev.parent = &dev->dev;
Having a slash in an I2C adapter name shouldn't be a problem. The real
problem is below:
err = request_irq(dev->irq, intel_mid_i2c_isr, IRQF_SHARED,
mrst->adap.name, mrst);
Using the adapter name to request the IRQ is silly. The very same issue
was fixed in i2c-pca-platform recently:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=323584436db0cb05286425d4dfd9516fce88487f
You want to use a short name for the interrupt. Either the driver name,
or if you really want something device-specific, the bus device name.
--
Jean Delvare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c_intel_mid: Fix slash in sysfs name
[not found] ` <20101215100815.44fb8b83-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2011-01-04 0:55 ` Ben Dooks
[not found] ` <4D227005.3010000-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2011-01-04 0:55 UTC (permalink / raw)
To: Jean Delvare
Cc: Alan Cox, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
On 15/12/10 09:08, Jean Delvare wrote:
> Hi Alan,
>
> On Tue, 14 Dec 2010 15:29:08 +0000, Alan Cox wrote:
>> From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>
>> This gets caught by the new sanity check code.
>
> New sanity check of what? Where's the code?
>
>> Instead of the slash use a
>> different symbol. This was originally found by Major Lee who proposed a
>> rather more complex patch which changed the name according to the chip
>> type.
>>
>> On the basis that we are in a late -rc and making Linus grumpy isn't always
>> a good idea (however fun) this is a simple alternative.
>>
>> Signed-off-by: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>> ---
>>
>> drivers/i2c/busses/i2c-intel-mid.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>>
>> diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c
>> index 657f314..da4bbdd 100644
>> --- a/drivers/i2c/busses/i2c-intel-mid.c
>> +++ b/drivers/i2c/busses/i2c-intel-mid.c
>> @@ -1035,7 +1035,7 @@ static int __devinit intel_mid_i2c_probe(struct pci_dev *dev,
>>
>> /* Initialize struct members */
>> snprintf(mrst->adap.name, sizeof(mrst->adap.name),
>> - "MRST/Medfield I2C at %lx", start);
>> + "Intel MID I2C at %lx", start);
>> mrst->adap.owner = THIS_MODULE;
>> mrst->adap.algo = &intel_mid_i2c_algorithm;
>> mrst->adap.dev.parent = &dev->dev;
>
> Having a slash in an I2C adapter name shouldn't be a problem. The real
> problem is below:
>
> err = request_irq(dev->irq, intel_mid_i2c_isr, IRQF_SHARED,
> mrst->adap.name, mrst);
>
> Using the adapter name to request the IRQ is silly. The very same issue
> was fixed in i2c-pca-platform recently:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=323584436db0cb05286425d4dfd9516fce88487f
I agree, something like dev_name(dev) is much better for readability
of /proc/interruopts
> You want to use a short name for the interrupt. Either the driver name,
> or if you really want something device-specific, the bus device name.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c_intel_mid: Fix slash in sysfs name
[not found] ` <4D227005.3010000-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
@ 2011-01-04 10:32 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2011-01-04 10:32 UTC (permalink / raw)
To: Ben Dooks
Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
> > New sanity check of what? Where's the code?
Slashes in path names - it was added to the sysfs code
> > Using the adapter name to request the IRQ is silly. The very same issue
> > was fixed in i2c-pca-platform recently:
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=323584436db0cb05286425d4dfd9516fce88487f
>
> I agree, something like dev_name(dev) is much better for readability
> of /proc/interruopts
I'll take a look at this now I am back from Christmas break.
Alan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-04 10:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 15:29 [PATCH] i2c_intel_mid: Fix slash in sysfs name Alan Cox
[not found] ` <20101214152849.7265.93628.stgit-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
2010-12-15 9:08 ` Jean Delvare
[not found] ` <20101215100815.44fb8b83-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-01-04 0:55 ` Ben Dooks
[not found] ` <4D227005.3010000-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
2011-01-04 10:32 ` Alan Cox
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).