diff options
Diffstat (limited to 'drivers/input/touchscreen/edt-ft5x06.c')
-rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 099d144ab7c..a9170157b44 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c | |||
@@ -491,14 +491,6 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode) | |||
491 | DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, | 491 | DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, |
492 | edt_ft5x06_debugfs_mode_set, "%llu\n"); | 492 | edt_ft5x06_debugfs_mode_set, "%llu\n"); |
493 | 493 | ||
494 | static int edt_ft5x06_debugfs_raw_data_open(struct inode *inode, | ||
495 | struct file *file) | ||
496 | { | ||
497 | file->private_data = inode->i_private; | ||
498 | |||
499 | return 0; | ||
500 | } | ||
501 | |||
502 | static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file, | 494 | static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file, |
503 | char __user *buf, size_t count, loff_t *off) | 495 | char __user *buf, size_t count, loff_t *off) |
504 | { | 496 | { |
@@ -579,11 +571,11 @@ out: | |||
579 | 571 | ||
580 | 572 | ||
581 | static const struct file_operations debugfs_raw_data_fops = { | 573 | static const struct file_operations debugfs_raw_data_fops = { |
582 | .open = edt_ft5x06_debugfs_raw_data_open, | 574 | .open = simple_open, |
583 | .read = edt_ft5x06_debugfs_raw_data_read, | 575 | .read = edt_ft5x06_debugfs_raw_data_read, |
584 | }; | 576 | }; |
585 | 577 | ||
586 | static void __devinit | 578 | static void |
587 | edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, | 579 | edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, |
588 | const char *debugfs_name) | 580 | const char *debugfs_name) |
589 | { | 581 | { |
@@ -600,7 +592,7 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, | |||
600 | tsdata->debug_dir, tsdata, &debugfs_raw_data_fops); | 592 | tsdata->debug_dir, tsdata, &debugfs_raw_data_fops); |
601 | } | 593 | } |
602 | 594 | ||
603 | static void __devexit | 595 | static void |
604 | edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) | 596 | edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) |
605 | { | 597 | { |
606 | if (tsdata->debug_dir) | 598 | if (tsdata->debug_dir) |
@@ -625,7 +617,7 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) | |||
625 | 617 | ||
626 | 618 | ||
627 | 619 | ||
628 | static int __devinit edt_ft5x06_ts_reset(struct i2c_client *client, | 620 | static int edt_ft5x06_ts_reset(struct i2c_client *client, |
629 | int reset_pin) | 621 | int reset_pin) |
630 | { | 622 | { |
631 | int error; | 623 | int error; |
@@ -649,7 +641,7 @@ static int __devinit edt_ft5x06_ts_reset(struct i2c_client *client, | |||
649 | return 0; | 641 | return 0; |
650 | } | 642 | } |
651 | 643 | ||
652 | static int __devinit edt_ft5x06_ts_identify(struct i2c_client *client, | 644 | static int edt_ft5x06_ts_identify(struct i2c_client *client, |
653 | char *model_name, | 645 | char *model_name, |
654 | char *fw_version) | 646 | char *fw_version) |
655 | { | 647 | { |
@@ -683,7 +675,7 @@ static int __devinit edt_ft5x06_ts_identify(struct i2c_client *client, | |||
683 | pdata->name <= edt_ft5x06_attr_##name.limit_high) \ | 675 | pdata->name <= edt_ft5x06_attr_##name.limit_high) \ |
684 | edt_ft5x06_register_write(tsdata, reg, pdata->name) | 676 | edt_ft5x06_register_write(tsdata, reg, pdata->name) |
685 | 677 | ||
686 | static void __devinit | 678 | static void |
687 | edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata, | 679 | edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata, |
688 | const struct edt_ft5x06_platform_data *pdata) | 680 | const struct edt_ft5x06_platform_data *pdata) |
689 | { | 681 | { |
@@ -697,7 +689,7 @@ edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata, | |||
697 | EDT_ATTR_CHECKSET(report_rate, WORK_REGISTER_REPORT_RATE); | 689 | EDT_ATTR_CHECKSET(report_rate, WORK_REGISTER_REPORT_RATE); |
698 | } | 690 | } |
699 | 691 | ||
700 | static void __devinit | 692 | static void |
701 | edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata) | 693 | edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata) |
702 | { | 694 | { |
703 | tsdata->threshold = edt_ft5x06_register_read(tsdata, | 695 | tsdata->threshold = edt_ft5x06_register_read(tsdata, |
@@ -710,7 +702,7 @@ edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata) | |||
710 | tsdata->num_y = edt_ft5x06_register_read(tsdata, WORK_REGISTER_NUM_Y); | 702 | tsdata->num_y = edt_ft5x06_register_read(tsdata, WORK_REGISTER_NUM_Y); |
711 | } | 703 | } |
712 | 704 | ||
713 | static int __devinit edt_ft5x06_ts_probe(struct i2c_client *client, | 705 | static int edt_ft5x06_ts_probe(struct i2c_client *client, |
714 | const struct i2c_device_id *id) | 706 | const struct i2c_device_id *id) |
715 | { | 707 | { |
716 | const struct edt_ft5x06_platform_data *pdata = | 708 | const struct edt_ft5x06_platform_data *pdata = |
@@ -830,7 +822,7 @@ err_free_mem: | |||
830 | return error; | 822 | return error; |
831 | } | 823 | } |
832 | 824 | ||
833 | static int __devexit edt_ft5x06_ts_remove(struct i2c_client *client) | 825 | static int edt_ft5x06_ts_remove(struct i2c_client *client) |
834 | { | 826 | { |
835 | const struct edt_ft5x06_platform_data *pdata = | 827 | const struct edt_ft5x06_platform_data *pdata = |
836 | dev_get_platdata(&client->dev); | 828 | dev_get_platdata(&client->dev); |
@@ -891,7 +883,7 @@ static struct i2c_driver edt_ft5x06_ts_driver = { | |||
891 | }, | 883 | }, |
892 | .id_table = edt_ft5x06_ts_id, | 884 | .id_table = edt_ft5x06_ts_id, |
893 | .probe = edt_ft5x06_ts_probe, | 885 | .probe = edt_ft5x06_ts_probe, |
894 | .remove = __devexit_p(edt_ft5x06_ts_remove), | 886 | .remove = edt_ft5x06_ts_remove, |
895 | }; | 887 | }; |
896 | 888 | ||
897 | module_i2c_driver(edt_ft5x06_ts_driver); | 889 | module_i2c_driver(edt_ft5x06_ts_driver); |