diff for duplicates of <20080321120718.1348.99530.sendpatchset@rx1.opensource.se> diff --git a/a/1.txt b/N1/1.txt index cc9ae15..3e484c3 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -223,28 +223,28 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + 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); @@ -366,7 +366,7 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + init_waitqueue_head(&pd->wait); + + /* Calculate the value for iccl. From the data sheet: -+ * iccl = (p clock ÷ transfer rate) à (L ÷ (L + H)) ++ * iccl = (p clock ÷ transfer rate) × (L ÷ (L + H)) + * where L and H are the SCL low/high ratio (5/4 in this case). + * We also round off the result. + */ @@ -379,7 +379,7 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + pd->iccl = (u_int8_t)(num/denom); + + /* Calculate the value for icch. From the data sheet: -+ icch = (p clock ÷ transfer rate) à (H ÷ (L + H)) */ ++ icch = (p clock ÷ transfer rate) × (H ÷ (L + H)) */ + num = peripheral_clk * 4; + tmp = num * 10 / denom; + if (tmp % 10 >= 5) @@ -433,7 +433,7 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + 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; + } @@ -454,7 +454,7 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + 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; @@ -463,14 +463,14 @@ Signed-off-by: Magnus Damm <damm@igel.co.jp> + size = (res->end - res->start) + 1; + + pd->ioarea = request_mem_region(res->start, size, dev->dev.bus_id); -+ if (pd->ioarea == NULL) { ++ if (pd->ioarea = NULL) { + dev_err(&dev->dev, "cannot request IO\n"); + ret = -ENXIO; + goto err_irq; + } + + 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_res; diff --git a/a/content_digest b/N1/content_digest index 21adf1c..35132f3 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,7 @@ + "ref\020080320141840.13560.24850.sendpatchset@rx1.opensource.se\0" "From\0Magnus Damm <magnus.damm@gmail.com>\0" "Subject\0[PATCH] i2c: SuperH Mobile I2C Bus Controller V2\0" - "Date\0Fri, 21 Mar 2008 21:07:18 +0900\0" + "Date\0Fri, 21 Mar 2008 12:07:18 +0000\0" "To\0i2c@lm-sensors.org\0" "Cc\0khali@linux-fr.org" Magnus Damm <magnus.damm@gmail.com> @@ -233,28 +234,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" @@ -376,7 +377,7 @@ "+\tinit_waitqueue_head(&pd->wait);\n" "+\n" "+\t/* Calculate the value for iccl. From the data sheet:\n" - "+\t * iccl = (p clock \303\203\302\267 transfer rate) \303\203\302\227 (L \303\203\302\267 (L + H))\n" + "+\t * iccl = (p clock \303\267 transfer rate) \303\227 (L \303\267 (L + H))\n" "+\t * where L and H are the SCL low/high ratio (5/4 in this case).\n" "+\t * We also round off the result.\n" "+\t */\n" @@ -389,7 +390,7 @@ "+\t\tpd->iccl = (u_int8_t)(num/denom);\n" "+\n" "+\t/* Calculate the value for icch. From the data sheet:\n" - "+\t icch = (p clock \303\203\302\267 transfer rate) \303\203\302\227 (H \303\203\302\267 (L + H)) */\n" + "+\t icch = (p clock \303\267 transfer rate) \303\227 (H \303\267 (L + H)) */\n" "+\tnum = peripheral_clk * 4;\n" "+\ttmp = num * 10 / denom;\n" "+\tif (tmp % 10 >= 5)\n" @@ -443,7 +444,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" @@ -464,7 +465,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" @@ -473,14 +474,14 @@ "+\tsize = (res->end - res->start) + 1;\n" "+\n" "+\tpd->ioarea = request_mem_region(res->start, size, dev->dev.bus_id);\n" - "+\tif (pd->ioarea == NULL) {\n" + "+\tif (pd->ioarea = NULL) {\n" "+\t\tdev_err(&dev->dev, \"cannot request IO\\n\");\n" "+\t\tret = -ENXIO;\n" "+\t\tgoto err_irq;\n" "+\t}\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_res;\n" @@ -557,4 +558,4 @@ "+MODULE_AUTHOR(\"Magnus Damm\");\n" "+MODULE_LICENSE(\"GPL\");" -93312e8555c2529f0122533126bfc807d4766a0cbf6d6f5c56d6c448a6dcd3cf +4f573baeaf69a6dc99e3a138f299ff4621a48f024ff7665693732a00e99b09f3
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.