diff for duplicates of <20080329175732.GA9638@fluff.org.uk> diff --git a/a/1.txt b/N1/1.txt index d4a26d2..d863b7f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -260,28 +260,28 @@ see above comment on the use of the named enum for the op field. > + goto do_wakeup; > + } > + -> + if (pd->pos == msg->len) { +> + if (pd->pos = msg->len) { > + i2c_op(pd, OP_RX_ONLY, 0); > + wakeup = 1; > + goto do_wakeup; > + } > + -> + if (pd->pos == -1) { +> + if (pd->pos = -1) { > + data = (msg->addr & 0x7f) << 1; > + data |= (msg->flags & I2C_M_RD) ? 1 : 0; > + } else > + data = msg->buf[pd->pos]; > + -> + if ((pd->pos == -1) || !(msg->flags & I2C_M_RD)) { +> + if ((pd->pos = -1) || !(msg->flags & I2C_M_RD)) { > + if (msg->flags & I2C_M_RD) > + i2c_op(pd, OP_TX_TO_RX, data); -> + else if (pd->pos == (msg->len - 1)) { +> + else if (pd->pos = (msg->len - 1)) { > + i2c_op(pd, OP_TX_STOP, data); > + wakeup = 1; > + } else > + i2c_op(pd, OP_TX_ONLY, data); > + } else { -> + if (pd->pos == (msg->len - 1)) +> + if (pd->pos = (msg->len - 1)) > + data = i2c_op(pd, OP_RX_STOP, 0); > + else > + data = i2c_op(pd, OP_RX_ONLY, 0); @@ -503,7 +503,7 @@ How many IRQs can one controller have? > + int ret; > + > + pd = kzalloc(sizeof(struct sh_mobile_i2c_data), GFP_KERNEL); -> + if (pd == NULL) { +> + if (pd = NULL) { > + dev_err(&dev->dev, "cannot allocate private data\n"); > + return -ENOMEM; > + } @@ -530,7 +530,7 @@ assumption that some other driver is holding the clock open for you? > + platform_set_drvdata(dev, pd); > + > + res = platform_get_resource(dev, IORESOURCE_MEM, 0); -> + if (res == NULL) { +> + if (res = NULL) { > + dev_err(&dev->dev, "cannot find IO resource\n"); > + ret = -ENOENT; > + goto err_irq; @@ -542,7 +542,7 @@ hmm, has no-one done as res_size() macro yet? > + > + pd->reg = ioremap(res->start, size); -> + if (pd->reg == NULL) { +> + if (pd->reg = NULL) { > + dev_err(&dev->dev, "cannot map IO\n"); > + ret = -ENXIO; > + goto err_irq; diff --git a/a/content_digest b/N1/content_digest index 37a6e6c..ada85d6 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -271,28 +271,28 @@ "> +\t\tgoto do_wakeup;\n" "> +\t}\n" "> +\n" - "> +\tif (pd->pos == msg->len) {\n" + "> +\tif (pd->pos = msg->len) {\n" "> +\t\ti2c_op(pd, OP_RX_ONLY, 0);\n" "> +\t\twakeup = 1;\n" "> +\t\tgoto do_wakeup;\n" "> +\t}\n" "> +\n" - "> +\tif (pd->pos == -1) {\n" + "> +\tif (pd->pos = -1) {\n" "> +\t\tdata = (msg->addr & 0x7f) << 1;\n" "> +\t\tdata |= (msg->flags & I2C_M_RD) ? 1 : 0;\n" "> +\t} else\n" "> +\t\tdata = msg->buf[pd->pos];\n" "> +\n" - "> +\tif ((pd->pos == -1) || !(msg->flags & I2C_M_RD)) {\n" + "> +\tif ((pd->pos = -1) || !(msg->flags & I2C_M_RD)) {\n" "> +\t\tif (msg->flags & I2C_M_RD)\n" "> +\t\t\ti2c_op(pd, OP_TX_TO_RX, data);\n" - "> +\t\telse if (pd->pos == (msg->len - 1)) {\n" + "> +\t\telse if (pd->pos = (msg->len - 1)) {\n" "> +\t\t\ti2c_op(pd, OP_TX_STOP, data);\n" "> +\t\t\twakeup = 1;\n" "> +\t\t} else\n" "> +\t\t\ti2c_op(pd, OP_TX_ONLY, data);\n" "> +\t} else {\n" - "> +\t\tif (pd->pos == (msg->len - 1))\n" + "> +\t\tif (pd->pos = (msg->len - 1))\n" "> +\t\t\tdata = i2c_op(pd, OP_RX_STOP, 0);\n" "> +\t\telse\n" "> +\t\t\tdata = i2c_op(pd, OP_RX_ONLY, 0);\n" @@ -514,7 +514,7 @@ "> +\tint ret;\n" "> +\n" "> +\tpd = kzalloc(sizeof(struct sh_mobile_i2c_data), GFP_KERNEL);\n" - "> +\tif (pd == NULL) {\n" + "> +\tif (pd = NULL) {\n" "> +\t\tdev_err(&dev->dev, \"cannot allocate private data\\n\");\n" "> +\t\treturn -ENOMEM;\n" "> +\t}\n" @@ -541,7 +541,7 @@ "> +\tplatform_set_drvdata(dev, pd);\n" "> +\n" "> +\tres = platform_get_resource(dev, IORESOURCE_MEM, 0);\n" - "> +\tif (res == NULL) {\n" + "> +\tif (res = NULL) {\n" "> +\t\tdev_err(&dev->dev, \"cannot find IO resource\\n\");\n" "> +\t\tret = -ENOENT;\n" "> +\t\tgoto err_irq;\n" @@ -553,7 +553,7 @@ "\n" "> +\n" "> +\tpd->reg = ioremap(res->start, size);\n" - "> +\tif (pd->reg == NULL) {\n" + "> +\tif (pd->reg = NULL) {\n" "> +\t\tdev_err(&dev->dev, \"cannot map IO\\n\");\n" "> +\t\tret = -ENXIO;\n" "> +\t\tgoto err_irq;\n" @@ -651,4 +651,4 @@ "\n" 'a smiley only costs 4 bytes' -220d31791fde5258dd1afcf27f3f777ba14755eb406ba054afe8dd3580e6f320 +f2665137f28f6774a562ab8dd29780984907726732869c2b5cbe8183659f95b7
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.