]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/kern-scale/api.c
asix-sigma: Propagate errors from firmware upload
[libsigrok.git] / src / hardware / kern-scale / api.c
index 7fa66bb3a8c498d58ce27b9e1b37478090bcbbd9..167bf1bc9958c8180b83908c2c47f95c5f27ae17 100644 (file)
@@ -14,8 +14,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <config.h>
@@ -165,7 +164,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        /* Device replies with "A00\r\n" (OK) or "E01\r\n" (Error). Ignore. */
 
        sr_sw_limits_acquisition_start(&devc->limits);
-       std_session_send_df_header(sdi, LOG_PREFIX);
+       std_session_send_df_header(sdi);
 
        /* Poll every 50ms, or whenever some data comes in. */
        serial_source_add(sdi->session, serial, G_IO_IN, 50,
@@ -174,12 +173,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int dev_acquisition_stop(struct sr_dev_inst *sdi)
-{
-       return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close,
-                       sdi->conn, LOG_PREFIX);
-}
-
 #define SCALE(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \
                        VALID, PARSE) \
        &((struct scale_info) { \
@@ -197,7 +190,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
                        .dev_open = std_serial_dev_open, \
                        .dev_close = std_serial_dev_close, \
                        .dev_acquisition_start = dev_acquisition_start, \
-                       .dev_acquisition_stop = dev_acquisition_stop, \
+                       .dev_acquisition_stop = std_serial_dev_acquisition_stop, \
                        .context = NULL, \
                }, \
                VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \