| .. | .. |
|---|
| 408 | 408 | rc--; |
|---|
| 409 | 409 | msleep(2); |
|---|
| 410 | 410 | ret = gsl_ts_write(client, 0xf0, &write_buf, sizeof(write_buf)); |
|---|
| 411 | + if (ret < 0) |
|---|
| 412 | + rc--; |
|---|
| 411 | 413 | msleep(2); |
|---|
| 412 | 414 | ret = gsl_ts_read(client, 0xf0, &read_buf, sizeof(read_buf)); |
|---|
| 413 | 415 | if (ret < 0) |
|---|
| .. | .. |
|---|
| 542 | 544 | size_t count, loff_t *data) |
|---|
| 543 | 545 | { |
|---|
| 544 | 546 | u8 buf[8] = {0}; |
|---|
| 545 | | - char temp_buf[CONFIG_LEN]; |
|---|
| 547 | + char temp_buf[CONFIG_LEN] = {0}; |
|---|
| 546 | 548 | char *path_buf; |
|---|
| 547 | 549 | int tmp = 0; |
|---|
| 548 | 550 | int tmp1 = 0; |
|---|
| .. | .. |
|---|
| 552 | 554 | return -EFAULT; |
|---|
| 553 | 555 | } |
|---|
| 554 | 556 | path_buf = kzalloc(count, GFP_KERNEL); |
|---|
| 555 | | - if (!path_buf) |
|---|
| 557 | + if (!path_buf) { |
|---|
| 556 | 558 | print_info("alloc path_buf memory error\n"); |
|---|
| 559 | + return -EFAULT; |
|---|
| 560 | + } |
|---|
| 557 | 561 | if (copy_from_user(path_buf, buffer, count)) { |
|---|
| 558 | 562 | print_info("copy from user fail\n"); |
|---|
| 559 | 563 | goto exit_write_proc_out; |
|---|
| .. | .. |
|---|
| 755 | 759 | #endif |
|---|
| 756 | 760 | } |
|---|
| 757 | 761 | |
|---|
| 758 | | -void ts_irq_disable(struct gsl_ts *ts) |
|---|
| 762 | +static void ts_irq_disable(struct gsl_ts *ts) |
|---|
| 759 | 763 | { |
|---|
| 760 | 764 | unsigned long irqflags; |
|---|
| 761 | 765 | |
|---|
| .. | .. |
|---|
| 767 | 771 | spin_unlock_irqrestore(&ts->irq_lock, irqflags); |
|---|
| 768 | 772 | } |
|---|
| 769 | 773 | |
|---|
| 770 | | -void ts_irq_enable(struct gsl_ts *ts) |
|---|
| 774 | +static void ts_irq_enable(struct gsl_ts *ts) |
|---|
| 771 | 775 | { |
|---|
| 772 | 776 | unsigned long irqflags = 0; |
|---|
| 773 | 777 | |
|---|
| .. | .. |
|---|
| 1227 | 1231 | queue_delayed_work(gsl_monitor_workqueue, &gsl_monitor_work, 1000); |
|---|
| 1228 | 1232 | #endif |
|---|
| 1229 | 1233 | #ifdef TPD_PROC_DEBUG |
|---|
| 1230 | | - proc_create(GSL_CONFIG_PROC_FILE, 0644, NULL, &gsl_seq_fops); |
|---|
| 1234 | + proc_create(GSL_CONFIG_PROC_FILE, 0644, NULL, |
|---|
| 1235 | + (const struct proc_ops *)&gsl_seq_fops); |
|---|
| 1231 | 1236 | gsl_proc_flag = 0; |
|---|
| 1232 | 1237 | #endif |
|---|
| 1233 | 1238 | ts->flag_activated = true; |
|---|