From: "Kevin McNeely" <Kevin.McNeely@cypress.com>
To: "Hong Liu" <hong.liu@intel.com>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"David Brown" <davidb@codeaurora.org>,
"Trilok Soni" <tsoni@codeaurora.org>,
"Henrik Rydberg" <rydberg@euromail.se>,
"Samuel Ortiz" <sameo@linux.intel.com>,
"Eric Miao" <eric.y.miao@gmail.com>,
"Mike Frysinger" <vapier@gentoo.org>,
"Alan Cox" <alan@linux.intel.com>, <linux-input@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: RE: [v3 1/3] 1/3 Touchscreen: Cypress TTSP G3 MTDEV Core Driver
Date: Tue, 4 Jan 2011 16:38:31 -0800 [thread overview]
Message-ID: <FB9C2CB29A07AB45B575A4E8D2AABC09014002D6@labamba.mis.cypress.com> (raw)
In-Reply-To: 1294105814.2570.17.camel@hongdev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4556 bytes --]
Hello Hong,
The uninitialized use of ts->dev will be fixed in v4.
Thank you,
Kevin
> -----Original Message-----
> From: Hong Liu [mailto:hong.liu@intel.com]
> Sent: Monday, January 03, 2011 5:50 PM
> To: Kevin McNeely
> Cc: Dmitry Torokhov; David Brown; Trilok Soni; Henrik Rydberg; Samuel
> Ortiz; Eric Miao; Mike Frysinger; Alan Cox; linux-
> input@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [v3 1/3] 1/3 Touchscreen: Cypress TTSP G3 MTDEV Core
> Driver
>
> On Thu, 2010-12-30 at 03:17 +0800, Kevin McNeely wrote:
> [...]
>
> > +
> > +void *cyttsp_core_init(struct cyttsp_bus_ops *bus_ops, struct device
> *dev)
> > +{
> > + struct input_dev *input_device;
> > +
> > + struct cyttsp *ts = kzalloc(sizeof(*ts), GFP_KERNEL);
> > +
> > + if (!ts) {
> > + dev_dbg(ts->dev, "%s: Error, kzalloc\n", __func__);
> > + goto error_alloc_data;
> > + }
>
> ts->dev is not assigned yet.
>
> Thanks,
> Hong
>
> > +
> > + if (dev == NULL || bus_ops == NULL) {
> > + kfree(ts);
> > + goto error_alloc_data;
> > + }
> > +
> > + mutex_init(&ts->mutex);
> > + ts->dev = dev;
> > + ts->platform_data = dev->platform_data;
> > + ts->bus_ops = bus_ops;
> > + init_completion(&ts->bl_ready);
> > +
> > + if (ts->platform_data->init) {
> > + if (ts->platform_data->init()) {
> > + dev_dbg(ts->dev, "%s: Error, platform init
> failed!\n",
> > + __func__);
> > + goto error_init;
> > + }
> > + }
> > +
> > + ts->irq = gpio_to_irq(ts->platform_data->irq_gpio);
> > + if (ts->irq <= 0) {
> > + dev_dbg(ts->dev, "%s: Error, failed to allocate
> irq\n",
> > + __func__);
> > + goto error_init;
> > + }
> > +
> > + /* Create the input device and register it. */
> > + input_device = input_allocate_device();
> > + if (!input_device) {
> > + dev_dbg(ts->dev, "%s: Error, failed to allocate input
> device\n",
> > + __func__);
> > + goto error_input_allocate_device;
> > + }
> > +
> > + ts->input = input_device;
> > + input_device->name = ts->platform_data->name;
> > + snprintf(ts->phys, sizeof(ts->phys), "%s", dev_name(dev));
> > + input_device->phys = ts->phys;
> > + input_device->dev.parent = ts->dev;
> > + ts->bus_type = bus_ops->dev->bus;
> > + input_device->open = cyttsp_open;
> > + input_device->close = cyttsp_close;
> > + input_set_drvdata(input_device, ts);
> > +
> > + __set_bit(EV_SYN, input_device->evbit);
> > + __set_bit(EV_KEY, input_device->evbit);
> > + __set_bit(EV_ABS, input_device->evbit);
> > +
> > + input_set_abs_params(input_device, ABS_MT_POSITION_X,
> > + 0, ts->platform_data->maxx, 0, 0);
> > + input_set_abs_params(input_device, ABS_MT_POSITION_Y,
> > + 0, ts->platform_data->maxy, 0, 0);
> > + input_set_abs_params(input_device, ABS_MT_TOUCH_MAJOR,
> > + 0, CY_MAXZ, 0, 0);
> > +
> > + if (input_register_device(input_device)) {
> > + dev_dbg(ts->dev, "%s: Error, failed to register input
> device\n",
> > + __func__);
> > + goto error_input_register_device;
> > + }
> > +
> > + goto no_error;
> > +
> > +error_input_register_device:
> > + input_unregister_device(input_device);
> > +error_input_allocate_device:
> > + if (ts->platform_data->exit)
> > + ts->platform_data->exit();
> > +error_init:
> > + mutex_destroy(&ts->mutex);
> > + kfree(ts);
> > +error_alloc_data:
> > +no_error:
> > + return ts;
> > +}
> > +EXPORT_SYMBOL_GPL(cyttsp_core_init);
> > +
> > +MODULE_LICENSE("GPL");
> > +MODULE_DESCRIPTION("Cypress TrueTouch(R) Standard touchscreen driver
> core");
> > +MODULE_AUTHOR("Cypress");
>
---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2011-01-05 0:40 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Kevin McNeely <kev@cypress.com>
2010-07-12 20:56 ` [PATCH] i2c: cyttsp i2c touchscreen driver init submit Kevin McNeely
2010-07-13 2:34 ` Christoph Fritz
2010-08-04 16:30 ` Kevin McNeely
2010-07-13 6:48 ` Henrik Rydberg
2010-08-04 16:38 ` Kevin McNeely
2010-07-13 7:31 ` Trilok Soni
2010-07-13 7:55 ` Dmitry Torokhov
2010-07-13 8:42 ` Trilok Soni
2010-07-22 10:33 ` Trilok Soni
2010-07-27 15:20 ` Kevin McNeely
2010-08-04 17:27 ` Kevin McNeely
2010-07-19 9:28 ` Jean Delvare
2010-08-04 17:22 ` Kevin McNeely
2010-08-05 18:12 ` [PATCH] i2c: cyttsp i2c and spi " Kevin McNeely
2010-08-05 20:45 ` Trilok Soni
2010-08-05 21:07 ` Dmitry Torokhov
2010-08-07 0:39 ` Kevin McNeely
2010-08-07 0:52 ` Kevin McNeely
2010-08-05 23:06 ` Henrik Rydberg
2010-08-07 0:32 ` Kevin McNeely
2010-08-07 0:49 ` Henrik Rydberg
2010-08-10 0:51 ` Kevin McNeely
2010-08-06 9:06 ` Trilok Soni
2010-08-10 0:49 ` Kevin McNeely
2010-11-09 18:25 ` [PATCH] touchscreen: Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-11-15 16:46 ` Henrik Rydberg
2010-11-19 17:39 ` Kevin McNeely
2010-12-01 7:22 ` Trilok Soni
2010-12-01 14:38 ` Henrik Rydberg
2010-12-01 23:59 ` Kevin McNeely
2010-12-02 0:01 ` Henrik Rydberg
2010-12-02 0:34 ` Dmitry Torokhov
2010-11-09 18:25 ` [PATCH] i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2010-11-09 18:25 ` [PATCH] spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2010-12-04 2:06 ` [v2] touchscreen Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-12-05 9:11 ` Henrik Rydberg
2010-12-04 2:06 ` [v2] 2/3 i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2010-12-04 2:06 ` [v2] 3/3 spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2010-12-29 19:17 ` [v3 1/3] 1/3 Touchscreen: Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-12-30 6:04 ` Shubhrajyoti Datta
2011-01-05 0:45 ` Kevin McNeely
2010-12-31 11:53 ` Henrik Rydberg
2010-12-31 12:55 ` Trilok Soni
2010-12-31 13:58 ` Henrik Rydberg
2011-01-03 9:44 ` Trilok Soni
2011-01-03 17:03 ` Kevin McNeely
2011-01-03 18:45 ` Henrik Rydberg
2011-01-03 20:50 ` Kevin McNeely
2011-01-04 1:50 ` Hong Liu
2011-01-05 0:38 ` Kevin McNeely [this message]
2010-12-29 19:17 ` [v3 2/3] 2/3 i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2011-01-04 1:45 ` Hong Liu
2011-01-05 0:37 ` Kevin McNeely
2010-12-29 19:17 ` [v3 3/3] 3/3 spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2011-01-05 0:54 ` [v4 1/3] 1/3 Touchscreen: Cypress TTSP G3 Core Driver Kevin McNeely
2011-01-05 8:59 ` Henrik Rydberg
2011-01-05 17:07 ` Kevin McNeely
2011-01-05 17:34 ` Henrik Rydberg
2011-01-10 19:27 ` Kevin McNeely
2011-01-10 21:11 ` Dmitry Torokhov
2011-01-10 21:17 ` Kevin McNeely
2011-02-24 18:31 ` Kevin McNeely
2011-02-27 12:34 ` Henrik Rydberg
2011-01-05 0:54 ` [v4 2/3] 2/3 i2c: Cypress TTSP G3 I2C Device Driver Kevin McNeely
2011-01-05 0:54 ` [v4 3/3] 3/3 spi: Cypress TTSP G3 SPI " Kevin McNeely
2011-01-12 18:45 ` Dmitry Torokhov
2011-01-12 19:02 ` Kevin McNeely
2011-01-20 11:10 ` Trilok Soni
2011-01-21 9:27 ` Dmitry Torokhov
2011-01-21 22:14 ` Kevin McNeely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FB9C2CB29A07AB45B575A4E8D2AABC09014002D6@labamba.mis.cypress.com \
--to=kevin.mcneely@cypress.com \
--cc=alan@linux.intel.com \
--cc=davidb@codeaurora.org \
--cc=dmitry.torokhov@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=hong.liu@intel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@euromail.se \
--cc=sameo@linux.intel.com \
--cc=tsoni@codeaurora.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).