There is a warning message as the following.
In __xlate_proc_name(), slash character is used for subdirectory.
Do not use a name which including slash character when calling
request_irq().
Original idea is from i2c-pca-platform.c.

[    4.502961] WARNING: at fs/proc/generic.c:323
__xlate_proc_name+0xbc/0xd0()
[    4.514756] name 'MRST/Medfield I2C at ff12a000'
[    4.522561] Modules linked in:
[    4.527657] Pid: 1, comm: swapper Not tainted 2.6.37-rc2 #1
[    4.537177] Call Trace:
[    4.541320]  [<c012e1b8>] ? warn_slowpath_common+0x78/0xb0
[    4.550621]  [<c01dbfdc>] ? __xlate_proc_name+0xbc/0xd0
[    4.559471]  [<c01dbfdc>] ? __xlate_proc_name+0xbc/0xd0
[    4.568324]  [<c012e283>] ? warn_slowpath_fmt+0x33/0x40
[    4.577179]  [<c01dbfdc>] ? __xlate_proc_name+0xbc/0xd0
[    4.586034]  [<c01dc536>] ? __proc_create+0x66/0x110
[    4.594443]  [<c01dce22>] ? proc_mkdir_mode+0x22/0x50
[    4.603000]  [<c0161d19>] ? register_handler_proc+0xe9/0x110
[    4.612601]  [<c015f764>] ? __setup_irq+0x194/0x2d0
[    4.620867]  [<c023234d>] ? vsnprintf+0xbd/0x420
[    4.628682]  [<c02df220>] ? intel_mid_i2c_isr+0x0/0x250
[    4.637532]  [<c015f960>] ? request_threaded_irq+0xc0/0x120
[    4.646980]  [<c0372935>] ? intel_mid_i2c_probe+0x287/0x30f
[    4.656421]  [<c024386b>] ? local_pci_probe+0xb/0x10
[    4.664840]  [<c0243aa1>] ? pci_device_probe+0x61/0x80
[    4.673537]  [<c0293da5>] ? driver_probe_device+0x65/0x170
[    4.682845]  [<c0243980>] ? pci_match_device+0xa0/0xc0
[    4.691538]  [<c0293f29>] ? __driver_attach+0x79/0x80
[    4.700095]  [<c0293eb0>] ? __driver_attach+0x0/0x80
[    4.708505]  [<c0293692>] ? bus_for_each_dev+0x52/0x80
[    4.717213]  [<c0293c46>] ? driver_attach+0x16/0x20
[    4.725474]  [<c0293eb0>] ? __driver_attach+0x0/0x80
[    4.733886]  [<c0293097>] ? bus_add_driver+0x177/0x230
[    4.742599]  [<c02439e0>] ? pci_device_remove+0x0/0x40
[    4.751300]  [<c02941b3>] ? driver_register+0x63/0x120
[    4.760006]  [<c0243ccd>] ? __pci_register_driver+0x3d/0xb0
[    4.769455]  [<c0101042>] ? do_one_initcall+0x32/0x160
[    4.778159]  [<c0475844>] ? intel_mid_i2c_init+0x0/0x11
[    4.787013]  [<c0455364>] ? kernel_init+0x110/0x1aa
[    4.795274]  [<c0455254>] ? kernel_init+0x0/0x1aa
[    4.803241]  [<c01030f6>] ? kernel_thread_helper+0x6/0x10

Signed-off-by: Major Lee <[email protected]>
---
 i2c-intel-mid.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff -uprN a/drivers/i2c/busses/i2c-intel-mid.c
b/drivers/i2c/busses/i2c-intel-mid.c
--- a/drivers/i2c/busses/i2c-intel-mid.c        2010-11-26
18:10:06.000000000 +0800
+++ b/drivers/i2c/busses/i2c-intel-mid.c        2010-11-29
15:06:23.878151000 +0800
@@ -1034,8 +1034,6 @@ static int __devinit intel_mid_i2c_probe
        }
 
        /* Initialize struct members */
-       snprintf(mrst->adap.name, sizeof(mrst->adap.name),
-               "MRST/Medfield I2C at %lx", start);
        mrst->adap.owner = THIS_MODULE;
        mrst->adap.algo = &intel_mid_i2c_algorithm;
        mrst->adap.dev.parent = &dev->dev;
@@ -1050,10 +1048,15 @@ static int __devinit intel_mid_i2c_probe
        i2c_set_adapdata(&mrst->adap, mrst);
 
        mrst->adap.nr = busnum = id->driver_data;
-       if (dev->device <= 0x0804)
+       if (dev->device <= 0x0804) {
                mrst->platform = MOORESTOWN;
-       else
+               snprintf(mrst->adap.name, sizeof(mrst->adap.name),
+                       "Moorestown I2C at %lx", start);
+       } else {
                mrst->platform = MEDFIELD;
+               snprintf(mrst->adap.name, sizeof(mrst->adap.name),
+                       "Medfield I2C at %lx", start);
+       }
 
        dev_dbg(&dev->dev, "I2C%d\n", busnum);
 
---
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to