X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmic-985xx%2Fapi.c;h=492f4b7930395c86a4a121a1e878748df1077335;hb=c3cd66a00cdb4afbd43108563d979eebfbafaf69;hp=510dbb819e7dd2a6d2003b6e314317a02aba4aa7;hpb=bee2b0168c087676c1b365861d8c2d4714afa9b9;p=libsigrok.git diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c index 510dbb81..492f4b79 100644 --- a/src/hardware/mic-985xx/api.c +++ b/src/hardware/mic-985xx/api.c @@ -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 . */ #include @@ -135,9 +134,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd (void)cg; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - devc = sdi->priv; return sr_sw_limits_config_set(&devc->limits, key, data); @@ -179,9 +175,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, int idx) struct dev_context *devc; struct sr_serial_dev_inst *serial; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - devc = sdi->priv; sr_sw_limits_acquisition_start(&devc->limits); @@ -195,12 +188,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, int idx) 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); -} - /* Driver-specific API function wrappers */ #define HW_SCAN(X) \ static GSList *scan_##X(struct sr_dev_driver *di, GSList *options) { \ @@ -232,7 +219,7 @@ static struct sr_dev_driver ID##_driver_info = { \ .dev_open = std_serial_dev_open, \ .dev_close = std_serial_dev_close, \ .dev_acquisition_start = dev_acquisition_start_##ID_UPPER, \ - .dev_acquisition_stop = dev_acquisition_stop, \ + .dev_acquisition_stop = std_serial_dev_acquisition_stop, \ .context = NULL, \ }; \ SR_REGISTER_DEV_DRIVER(ID##_driver_info)