Ticket #12658: 0001-cleaning-for-ticket-12658.patch

File 0001-cleaning-for-ticket-12658.patch, 2.4 KB (added by Anarchos, 9 years ago)

Patch to solve some of the issues

  • src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp

    From a9fd8912c8900615bc7a37b1e73e2a3e378c0a3b Mon Sep 17 00:00:00 2001
    From: S K <sylvain_kerjean@hotmail.com>
    Date: Sun, 21 Feb 2016 23:36:29 +0100
    Subject: [PATCH] cleaning for ticket #12658
    
    ---
     .../kernel/bus_managers/ps2/ps2_elantech.cpp       | 26 ----------------------
     1 file changed, 26 deletions(-)
    
    diff --git a/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp b/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp
    index e3a33df..f1cec03 100644
    a b default_settings(touchpad_settings *set)  
    210210static status_t
    211211synaptics_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)
    212212{
    213     uint8 val;
    214213    if (ps2_dev_sliced_command(dev, cmd) != B_OK
    215214        || ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, in, in_count)
    216215        != B_OK) {
    synaptics_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)  
    224223static status_t
    225224elantech_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)
    226225{
    227     uint8 val;
    228226    if (ps2_dev_command(dev, ELANTECH_CMD_PS2_CUSTOM_CMD) != B_OK
    229227        || ps2_dev_command(dev, cmd) != B_OK
    230228        || ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, in, in_count)
    elantech_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)  
    239237status_t
    240238probe_elantech(ps2_dev* dev)
    241239{
    242     int i;
    243240    uint8 val[3];
    244241    TRACE("ELANTECH: probe\n");
    245242
    elantech_read_reg(elantech_cookie* cookie, uint8 reg, uint8 *value)  
    387384    return B_OK;
    388385}
    389386
    390 
    391 
    392 static status_t
    393 switch_hardware_tab(ps2_dev* dev, bool on)
    394 {
    395     uint8 val[3];
    396     uint8 arg = 0x00;
    397     uint8 command = PS2_CMD_MOUSE_SET_RES;
    398     if (on) {
    399         arg = 0x0A;
    400         command = PS2_CMD_SET_SAMPLE_RATE;
    401     }
    402     if (ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, val, 3) != B_OK
    403         || ps2_dev_command(dev, PS2_CMD_DISABLE, NULL, 0, NULL, 0) != B_OK
    404         || ps2_dev_command(dev, PS2_CMD_DISABLE, NULL, 0, NULL, 0) != B_OK
    405         || ps2_dev_command(dev, command, &arg, 1, NULL, 0) != B_OK)
    406         return B_ERROR;
    407 
    408     return B_OK;
    409 }
    410 
    411 
    412387static status_t
    413388get_resolution_v4(elantech_cookie* cookie, uint32* x, uint32* y)
    414389{
    static status_t  
    426401get_range(elantech_cookie* cookie, uint32* x_min, uint32* y_min, uint32* x_max,
    427402    uint32* y_max, uint32 *width)
    428403{
    429     status_t status = B_OK;
    430404    uint8 val[3];
    431405    switch (cookie->version) {
    432406        case 1: