]> sigrok.org Git - libsigrok.git/commitdiff
libsigrok-internal.h: Remove unused prototypes
authorDaniel Elstner <redacted>
Fri, 11 Sep 2015 21:22:54 +0000 (23:22 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 16:24:15 +0000 (18:24 +0200)
The sr_source_* prototypes are not used anywhere, so remove them.
Also get rid of the SERIAL_PARITY_* aliases for SP_PARITY_*.

src/libsigrok-internal.h
src/serial.c

index 8fb9006aaeedad61f8f33b6bda211a690321d54c..c2fa671bd6d64549d9d63f4ecbee8968c22b7f70 100644 (file)
@@ -564,9 +564,6 @@ struct sr_usb_dev_inst {
 #endif
 
 #ifdef HAVE_LIBSERIALPORT
-#define SERIAL_PARITY_NONE SP_PARITY_NONE
-#define SERIAL_PARITY_EVEN SP_PARITY_EVEN
-#define SERIAL_PARITY_ODD  SP_PARITY_ODD
 struct sr_serial_dev_inst {
        /** Port name, e.g. '/dev/tty42'. */
        char *port;
@@ -682,15 +679,6 @@ SR_PRIV int sr_variant_type_check(uint32_t key, GVariant *data);
 SR_PRIV void sr_hw_cleanup_all(const struct sr_context *ctx);
 SR_PRIV struct sr_config *sr_config_new(uint32_t key, GVariant *data);
 SR_PRIV void sr_config_free(struct sr_config *src);
-SR_PRIV int sr_source_remove(int fd);
-SR_PRIV int sr_source_remove_pollfd(GPollFD *pollfd);
-SR_PRIV int sr_source_remove_channel(GIOChannel *channel);
-SR_PRIV int sr_source_add(int fd, int events, int timeout,
-               sr_receive_data_callback cb, void *cb_data);
-SR_PRIV int sr_source_add_pollfd(GPollFD *pollfd, int timeout,
-               sr_receive_data_callback cb, void *cb_data);
-SR_PRIV int sr_source_add_channel(GIOChannel *channel, int events, int timeout,
-               sr_receive_data_callback cb, void *cb_data);
 
 /*--- session.c -------------------------------------------------------------*/
 
index 136edcad92a2f0253ce855e8d6451bd3f00248ac..e19c7c875935dbea9688d4f1cff1b3ad8c182311 100644 (file)
@@ -519,13 +519,13 @@ SR_PRIV int serial_set_paramstr(struct sr_serial_dev_inst *serial,
                if ((mstr = g_match_info_fetch(match, 3))) {
                        switch (mstr[0]) {
                        case 'n':
-                               parity = SERIAL_PARITY_NONE;
+                               parity = SP_PARITY_NONE;
                                break;
                        case 'e':
-                               parity = SERIAL_PARITY_EVEN;
+                               parity = SP_PARITY_EVEN;
                                break;
                        case 'o':
-                               parity = SERIAL_PARITY_ODD;
+                               parity = SP_PARITY_ODD;
                                break;
                        }
                }