diff for duplicates of <10533859483351@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 612f8b7..645f371 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -110,7 +110,7 @@ diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c + spin_lock(&i2c_dev_array_lock); + for (i = 0; i < I2C_MINORS; ++i) { + if ((i2c_dev_array[i]) && -+ (i2c_dev_array[i]->adap = adap)) { ++ (i2c_dev_array[i]->adap == adap)) { + i2c_dev = i2c_dev_array[i]; + break; + } @@ -166,7 +166,7 @@ diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c - /* copy user space data to kernel space. */ tmp = kmalloc(count,GFP_KERNEL); - if (tmp=NULL) + if (tmp==NULL) return -ENOMEM; @@ -129,7 +157,6 @@ if (count > 8192) @@ -174,7 +174,7 @@ diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c - /* copy user space data to kernel space. */ tmp = kmalloc(count,GFP_KERNEL); - if (tmp=NULL) + if (tmp==NULL) return -ENOMEM; @@ -157,7 +184,7 @@ int i,datasize,res; @@ -208,7 +208,7 @@ diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c + struct i2c_dev *i2c_dev; - adap = i2c_get_adapter(minor); -- if (NULL = adap) +- if (NULL == adap) + i2c_dev = i2c_dev_get_by_minor(minor); + if (!i2c_dev) + return -ENODEV; @@ -257,7 +257,7 @@ diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c + + /* register this i2c device with the driver core */ + i2c_dev->adap = adap; -+ if (adap->dev.parent = &legacy_bus) ++ if (adap->dev.parent == &legacy_bus) + i2c_dev->class_dev.dev = &adap->dev; + else + i2c_dev->class_dev.dev = adap->dev.parent; diff --git a/a/content_digest b/N1/content_digest index 2397117..2817714 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,7 @@ "ref\01053385947386@kroah.com\0" - "ref\020030323081431.GF26145@kroah.com\0" - "From\0greg@kroah.com (Greg KH)\0" - "Subject\0[PATCH] Yet more i2c driver changes for 2.5.69\0" - "Date\0Thu, 19 May 2005 06:23:56 +0000\0" + "From\0Greg KH <greg@kroah.com>\0" + "Subject\0Re: [PATCH] Yet more i2c driver changes for 2.5.69\0" + "Date\0Mon, 19 May 2003 16:12:28 -0700\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "\00:1\0" @@ -119,7 +118,7 @@ "+\tspin_lock(&i2c_dev_array_lock);\n" "+\tfor (i = 0; i < I2C_MINORS; ++i) {\n" "+\t\tif ((i2c_dev_array[i]) &&\n" - "+\t\t (i2c_dev_array[i]->adap = adap)) {\n" + "+\t\t (i2c_dev_array[i]->adap == adap)) {\n" "+\t\t\ti2c_dev = i2c_dev_array[i];\n" "+\t\t\tbreak;\n" "+\t\t}\n" @@ -175,7 +174,7 @@ " \n" "-\t/* copy user space data to kernel space. */\n" " \ttmp = kmalloc(count,GFP_KERNEL);\n" - " \tif (tmp=NULL)\n" + " \tif (tmp==NULL)\n" " \t\treturn -ENOMEM;\n" "@@ -129,7 +157,6 @@\n" " \tif (count > 8192)\n" @@ -183,7 +182,7 @@ " \n" "-\t/* copy user space data to kernel space. */\n" " \ttmp = kmalloc(count,GFP_KERNEL);\n" - " \tif (tmp=NULL)\n" + " \tif (tmp==NULL)\n" " \t\treturn -ENOMEM;\n" "@@ -157,7 +184,7 @@\n" " \tint i,datasize,res;\n" @@ -217,7 +216,7 @@ "+\tstruct i2c_dev *i2c_dev;\n" " \n" "-\tadap = i2c_get_adapter(minor);\n" - "-\tif (NULL = adap)\n" + "-\tif (NULL == adap)\n" "+\ti2c_dev = i2c_dev_get_by_minor(minor);\n" "+\tif (!i2c_dev)\n" "+\t\treturn -ENODEV;\n" @@ -266,7 +265,7 @@ "+\n" "+\t/* register this i2c device with the driver core */\n" "+\ti2c_dev->adap = adap;\n" - "+\tif (adap->dev.parent = &legacy_bus)\n" + "+\tif (adap->dev.parent == &legacy_bus)\n" "+\t\ti2c_dev->class_dev.dev = &adap->dev;\n" "+\telse\n" "+\t\ti2c_dev->class_dev.dev = adap->dev.parent;\n" @@ -359,4 +358,4 @@ " MODULE_DESCRIPTION(\"I2C /dev entries driver\");\n" " MODULE_LICENSE(\"GPL\");" -44b1fa63e2fcedd2cd61d7d7256f9a2cabe3a50ab2fab98bf92386079386cd8f +05d3c9325cddd93e62b28fb0904fc297d11bb8bb28193049c10409d2a36d24c0
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.