| .. | .. |
|---|
| 140 | 140 | {0x0f, 0x02}, |
|---|
| 141 | 141 | {0x10, 0x88}, |
|---|
| 142 | 142 | {0x16, 0x00}, |
|---|
| 143 | | - {0x17, 0x10}, |
|---|
| 143 | + {0x17, 0x17}, |
|---|
| 144 | 144 | {0x18, 0x1a}, |
|---|
| 145 | 145 | {0x19, 0x14}, |
|---|
| 146 | 146 | {0x1b, 0x48}, |
|---|
| .. | .. |
|---|
| 790 | 790 | } |
|---|
| 791 | 791 | |
|---|
| 792 | 792 | ret = gc0312_ioctl(sd, cmd, inf); |
|---|
| 793 | | - if (!ret) { |
|---|
| 793 | + if (!ret) |
|---|
| 794 | 794 | ret = copy_to_user(up, inf, sizeof(*inf)); |
|---|
| 795 | | - if (ret) |
|---|
| 796 | | - ret = -EFAULT; |
|---|
| 797 | | - } |
|---|
| 798 | 795 | kfree(inf); |
|---|
| 799 | 796 | break; |
|---|
| 800 | 797 | case RKMODULE_AWB_CFG: |
|---|
| .. | .. |
|---|
| 807 | 804 | ret = copy_from_user(cfg, up, sizeof(*cfg)); |
|---|
| 808 | 805 | if (!ret) |
|---|
| 809 | 806 | ret = gc0312_ioctl(sd, cmd, cfg); |
|---|
| 810 | | - else |
|---|
| 811 | | - ret = -EFAULT; |
|---|
| 812 | 807 | kfree(cfg); |
|---|
| 813 | 808 | break; |
|---|
| 814 | 809 | case RKMODULE_SET_QUICK_STREAM: |
|---|
| 815 | 810 | ret = copy_from_user(&stream, up, sizeof(u32)); |
|---|
| 816 | 811 | if (!ret) |
|---|
| 817 | 812 | ret = gc0312_ioctl(sd, cmd, &stream); |
|---|
| 818 | | - else |
|---|
| 819 | | - ret = -EFAULT; |
|---|
| 820 | 813 | break; |
|---|
| 821 | 814 | default: |
|---|
| 822 | 815 | ret = -ENOIOCTLCMD; |
|---|
| .. | .. |
|---|
| 934 | 927 | if (fie->index >= ARRAY_SIZE(gc0312_framesizes)) |
|---|
| 935 | 928 | return -EINVAL; |
|---|
| 936 | 929 | |
|---|
| 937 | | - if (fie->code != MEDIA_BUS_FMT_YUYV8_2X8) |
|---|
| 938 | | - return -EINVAL; |
|---|
| 939 | | - |
|---|
| 930 | + fie->code = MEDIA_BUS_FMT_YUYV8_2X8; |
|---|
| 940 | 931 | fie->width = gc0312_framesizes[fie->index].width; |
|---|
| 941 | 932 | fie->height = gc0312_framesizes[fie->index].height; |
|---|
| 942 | 933 | fie->interval = gc0312_framesizes[fie->index].max_fps; |
|---|