Various cosmetics, whitespace, consistency fixes.

This commit is contained in:
Uwe Hermann 2013-07-31 13:09:48 +02:00
parent 1663ebe27f
commit ce4d26ddf9
12 changed files with 14 additions and 33 deletions

View File

@ -17,9 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H
#ifndef LIBSIGROK_AGILENT_DMM_H #define LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H
#define LIBSIGROK_AGILENT_DMM_H
/* Message logging helpers with subsystem-specific prefix string. */ /* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "agilent-dmm: " #define LOG_PREFIX "agilent-dmm: "
@ -85,4 +84,4 @@ struct agdmm_recv {
SR_PRIV int agdmm_receive_data(int fd, int revents, void *cb_data); SR_PRIV int agdmm_receive_data(int fd, int revents, void *cb_data);
#endif /* LIBSIGROK_AGILENT_DMM_H */ #endif

View File

@ -144,7 +144,7 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd)
sr_err("Failed to send: %s.", strerror(errno)); sr_err("Failed to send: %s.", strerror(errno));
return SR_ERR; return SR_ERR;
} }
return SR_OK; return SR_OK;
} }

View File

@ -383,7 +383,7 @@ static int bin2bitbang(const char *filename,
static void clear_helper(void *priv) static void clear_helper(void *priv)
{ {
struct dev_context *devc; struct dev_context *devc;
devc = priv; devc = priv;
ftdi_deinit(&devc->ftdic); ftdi_deinit(&devc->ftdic);

View File

@ -144,11 +144,7 @@ static GSList *scan(GSList *options)
static GSList *dev_list(void) static GSList *dev_list(void)
{ {
struct drv_context *drvc; return ((struct drv_context *)(di->priv))->instances;
drvc = di->priv;
return drvc->instances;
} }
static int dev_clear(void) static int dev_clear(void)

View File

@ -544,7 +544,6 @@ SR_PRIV int cem_dt_885x_weight_freq_get(const struct sr_dev_inst *sdi)
return SR_MQFLAG_SPL_FREQ_WEIGHT_C; return SR_MQFLAG_SPL_FREQ_WEIGHT_C;
} else } else
return cur_setting; return cur_setting;
} }
SR_PRIV int cem_dt_885x_weight_freq_set(const struct sr_dev_inst *sdi, int freqw) SR_PRIV int cem_dt_885x_weight_freq_set(const struct sr_dev_inst *sdi, int freqw)
@ -607,7 +606,6 @@ SR_PRIV int cem_dt_885x_weight_time_get(const struct sr_dev_inst *sdi)
return SR_MQFLAG_SPL_TIME_WEIGHT_S; return SR_MQFLAG_SPL_TIME_WEIGHT_S;
} else } else
return cur_setting; return cur_setting;
} }
SR_PRIV int cem_dt_885x_weight_time_set(const struct sr_dev_inst *sdi, int timew) SR_PRIV int cem_dt_885x_weight_time_set(const struct sr_dev_inst *sdi, int timew)

View File

@ -25,7 +25,6 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
static void process_packet(const struct sr_dev_inst *sdi) static void process_packet(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
@ -232,4 +231,3 @@ SR_PRIV int colead_slm_receive_data(int fd, int revents, void *cb_data)
return TRUE; return TRUE;
} }

View File

@ -17,9 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
#ifndef LIBSIGROK_FLUKE_DMM_H #define LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
#define LIBSIGROK_FLUKE_DMM_H
/* Message logging helpers with subsystem-specific prefix string. */ /* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "fluke-dmm: " #define LOG_PREFIX "fluke-dmm: "
@ -73,4 +72,4 @@ struct dev_context {
SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data); SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data);
#endif /* LIBSIGROK_FLUKE_DMM_H */ #endif

View File

@ -26,7 +26,6 @@
#include "libsigrok-internal.h" #include "libsigrok-internal.h"
#include "fluke-dmm.h" #include "fluke-dmm.h"
static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi, static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
char **tokens) char **tokens)
{ {
@ -532,5 +531,3 @@ SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data)
return TRUE; return TRUE;
} }

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_H #ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H
#define LIBSIGROK_HARDWARE_HANTEK_DSO_H #define LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H
/* Message logging helpers with subsystem-specific prefix string. */ /* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "hantek-dso: " #define LOG_PREFIX "hantek-dso: "
@ -76,8 +76,8 @@ enum dso_commands {
CMD_GET_CAPTURESTATE, CMD_GET_CAPTURESTATE,
CMD_SET_VOLTAGE, CMD_SET_VOLTAGE,
/* unused */ /* unused */
cmdSetLogicalData, CMD_SET_LOGICALDATA,
cmdGetLogicalData, CMD_GET_LOGICALDATA,
}; };
/* Must match the coupling table. */ /* Must match the coupling table. */

View File

@ -168,11 +168,7 @@ static GSList *scan(GSList *options)
static GSList *dev_list(void) static GSList *dev_list(void)
{ {
struct drv_context *drvc; return ((struct drv_context *)(di->priv))->instances;
drvc = di->priv;
return drvc->instances;
} }
static int dev_clear(void) static int dev_clear(void)

View File

@ -658,4 +658,3 @@ SR_PRIV int lascar_stop_logging(const struct sr_dev_inst *sdi)
return ret; return ret;
} }

View File

@ -288,4 +288,3 @@ SR_PRIV int rigol_ds1xx2_get_dev_cfg(const struct sr_dev_inst *sdi)
return SR_OK; return SR_OK;
} }