From: Uwe Hermann Date: Tue, 3 May 2011 17:15:54 +0000 (+0200) Subject: libsigrok: Rename open/close to opendev/closedev. X-Git-Tag: libsigrok-0.1.0~267 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=86f5e3d826fc9059e110f07221cb1a30652ceac2;p=libsigrok.git libsigrok: Rename open/close to opendev/closedev. --- diff --git a/device.c b/device.c index fc2635b5..a1556aa4 100644 --- a/device.c +++ b/device.c @@ -65,8 +65,8 @@ void sr_device_close_all(void) while (devices) { device = devices->data; - if (device->plugin && device->plugin->close) - device->plugin->close(device->plugin_index); + if (device->plugin && device->plugin->closedev) + device->plugin->closedev(device->plugin_index); sr_device_destroy(device); } } diff --git a/hardware/alsa/alsa.c b/hardware/alsa/alsa.c index f567e43a..95161b7a 100644 --- a/hardware/alsa/alsa.c +++ b/hardware/alsa/alsa.c @@ -364,8 +364,8 @@ struct sr_device_plugin alsa_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 76b046a0..50bb932d 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -1367,8 +1367,8 @@ struct sr_device_plugin asix_sigma_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/chronovu-la8/chronovu-la8.c b/hardware/chronovu-la8/chronovu-la8.c index da9eea9b..d2f07b10 100644 --- a/hardware/chronovu-la8/chronovu-la8.c +++ b/hardware/chronovu-la8/chronovu-la8.c @@ -1028,8 +1028,8 @@ struct sr_device_plugin chronovu_la8_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 70855866..f28fa525 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -429,8 +429,8 @@ struct sr_device_plugin demo_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index efafb0a3..d37ba020 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -779,8 +779,8 @@ struct sr_device_plugin link_mso19_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index d4d17688..d2d49768 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -952,8 +952,8 @@ struct sr_device_plugin ols_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 379da200..173e8ada 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -759,8 +759,8 @@ struct sr_device_plugin saleae_logic_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 54d888b0..9b867dca 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -570,8 +570,8 @@ struct sr_device_plugin zeroplus_logic_cube_plugin_info = { .api_version = 1, .init = hw_init, .cleanup = hw_cleanup, - .open = hw_opendev, - .close = hw_closedev, + .opendev = hw_opendev, + .closedev = hw_closedev, .get_device_info = hw_get_device_info, .get_status = hw_get_status, .get_capabilities = hw_get_capabilities, diff --git a/session.c b/session.c index 6e597ab3..b80ab7d5 100644 --- a/session.c +++ b/session.c @@ -71,8 +71,8 @@ int sr_session_device_add(struct sr_device *device) { int ret; - if (device->plugin && device->plugin->open) { - ret = device->plugin->open(device->plugin_index); + if (device->plugin && device->plugin->opendev) { + ret = device->plugin->opendev(device->plugin_index); if (ret != SR_OK) return ret; } diff --git a/sigrok.h b/sigrok.h index e839c484..2fd17119 100644 --- a/sigrok.h +++ b/sigrok.h @@ -327,8 +327,8 @@ struct sr_device_plugin { void (*cleanup) (void); /* Device-specific */ - int (*open) (int device_index); - void (*close) (int device_index); + int (*opendev) (int device_index); + void (*closedev) (int device_index); void *(*get_device_info) (int device_index, int device_info_id); int (*get_status) (int device_index); int *(*get_capabilities) (void);