1. 08 Aug, 2019 1 commit
  2. 05 Aug, 2019 1 commit
  3. 18 Jun, 2019 1 commit
    • Benjamin Berg's avatar
      lib: Remove state from fp_img_driver activate handler · 4cec2841
      Benjamin Berg authored
      The state was always AWAIT_FINGER and it was never used by any driver
      (except for error checking). So remove it, in particular as a correct
      state change will be done after activation anyway.
      
      The only driver with code that actually did anything based on this was
      the URU4000 driver. However, all it did was an explicit state change
      execution. This is not necessary, as the state_change handler is called
      anyway (i.e. we now only write the AWAIT_FINGER register once rather
      than twice).
      
      Manual changes plus:
      
      @ init @
      identifier driver_name;
      identifier activate_func;
      @@
      struct fp_img_driver driver_name = {
          ...,
          .activate = activate_func,
          ...,
      };
      @ remove_arg @
      identifier dev;
      identifier state;
      identifier init.activate_func;
      @@
      activate_func (
      	struct fp_img_dev *dev
      -	, enum fp_imgdev_state state
      	)
      {
      	<...
      -	if (state != IMGDEV_STATE_AWAIT_FINGER_ON) { ... }
      	...>
      }
      4cec2841
  4. 06 Jun, 2019 4 commits
  5. 12 Dec, 2018 3 commits
    • Bastien Nocera's avatar
      elan: Fix "garbage value" errors in elan_cmd_cb() · 69fe7a1b
      Bastien Nocera authored
      libfprint/drivers/elan.c:351:4: warning: 2nd function call argument is an uninitialized value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:46:5: note: expanded from macro 'dbg_buf'
          fp_dbg("%02x", buf[0]);                                  \
          ^~~~~~~~~~~~~~~~~~~~~~
      ../../../../../../Projects/jhbuild/libfprint/libfprint/fpi-log.h:52:16: note: expanded from macro 'fp_dbg'
       #define fp_dbg g_debug
                     ^
      libfprint/drivers/elan.c:351:4: warning: The left operand of '<<' is a garbage value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:48:27: note: expanded from macro 'dbg_buf'
          fp_dbg("%04x", buf[0] << 8 | buf[1]);                    \
                         ~~~~~~ ^
      libfprint/drivers/elan.c:351:4: warning: The left operand of '<<' is a garbage value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:50:41: note: expanded from macro 'dbg_buf'
          fp_dbg("%04x... (%d bytes)", buf[0] << 8 | buf[1], len)
                                       ~~~~~~ ^
      69fe7a1b
    • Bastien Nocera's avatar
      elan: Assert on a possible division by zero in elan_need_calibration() · ce856efa
      Bastien Nocera authored
      libfprint/drivers/elan.c:598:10: warning: Division by zero
              bg_mean /= frame_size;
              ~~~~~~~~^~~~~~~~~~~~~
      ce856efa
    • Bastien Nocera's avatar
      elan: Assert on a possible division by zero in elan_process_frame_linear() · b54514df
      Bastien Nocera authored
      libfprint/drivers/elan.c:249:26: warning: Division by zero
                      px = (px - min) * 0xff / (max - min);
                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      b54514df
  6. 13 Nov, 2018 1 commit
    • Bastien Nocera's avatar
      elan: Fix format mismatch warnings in debug output · 9da69dfc
      Bastien Nocera authored
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:46:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%02hx", buf[0]);                                  \
          ~~~~~~~~~~~~~~~~^~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:48:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx", buf[0] << 8 | buf[1]);                    \
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:50:35: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx... (%d bytes)", buf[0] << 8 | buf[1], len)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:46:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%02hx", buf[0]);                                  \
          ~~~~~~~~~~~~~~~~^~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:48:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx", buf[0] << 8 | buf[1]);                    \
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:50:35: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx... (%d bytes)", buf[0] << 8 | buf[1], len)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      9da69dfc
  7. 27 Sep, 2018 3 commits
  8. 19 Sep, 2018 2 commits
  9. 18 Sep, 2018 5 commits
  10. 14 Sep, 2018 3 commits
  11. 05 Sep, 2018 2 commits
  12. 10 Aug, 2018 7 commits
  13. 09 Aug, 2018 1 commit
    • Igor Filatov's avatar
      elan: Change command structs, support more devices · bccff4ff
      Igor Filatov authored
      Make each command a separate struct to get finer control over which
      commands are called on which devices. Update ssm's accordingly. Add
      sensor_reset and fuse_load commands.
      
      Support 0x0903, 0x0c03, 0x0c16, 0x0c1a, 0x0c26
      bccff4ff
  14. 18 Jun, 2018 1 commit
  15. 13 Jun, 2018 1 commit
  16. 29 May, 2018 4 commits