Use const pointer for chopstx_poll.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2017-11-16 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* src/usb-ccid.c (ccid_thread): Use constant pointer for
|
||||||
|
chopstx_poll.
|
||||||
|
(poll_event_intr): Remove.
|
||||||
|
|
||||||
2017-11-15 NIIBE Yutaka <gniibe@fsij.org>
|
2017-11-15 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* src/usb-ccid.c (usb_event_handle): Allow sleep on suspend.
|
* src/usb-ccid.c (usb_event_handle): Allow sleep on suspend.
|
||||||
|
|||||||
2
chopstx
2
chopstx
Submodule chopstx updated: bbe09de209...3552fc5615
@@ -1665,24 +1665,18 @@ usb_event_handle (struct usb_dev *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
poll_event_intr (uint32_t *timeout_p,
|
|
||||||
struct eventflag *ev, chopstx_intr_t *intr)
|
|
||||||
{
|
|
||||||
chopstx_poll_cond_t poll_desc;
|
|
||||||
struct chx_poll_head *pd_array[2] = {
|
|
||||||
(struct chx_poll_head *)intr,
|
|
||||||
(struct chx_poll_head *)&poll_desc
|
|
||||||
};
|
|
||||||
|
|
||||||
eventflag_prepare_poll (ev, &poll_desc);
|
static chopstx_intr_t interrupt;
|
||||||
chopstx_poll (timeout_p, 2, pd_array);
|
static chopstx_poll_cond_t cond_poll_desc;
|
||||||
}
|
static struct chx_poll_head *const pd_array[] = {
|
||||||
|
(struct chx_poll_head *const)&interrupt,
|
||||||
|
(struct chx_poll_head *const)&cond_poll_desc
|
||||||
|
};
|
||||||
|
#define PD_SIZE (sizeof (pd_array)/sizeof (struct chx_poll_head *))
|
||||||
|
|
||||||
void *
|
void *
|
||||||
ccid_thread (void *arg)
|
ccid_thread (void *arg)
|
||||||
{
|
{
|
||||||
chopstx_intr_t interrupt;
|
|
||||||
uint32_t timeout;
|
uint32_t timeout;
|
||||||
struct usb_dev dev;
|
struct usb_dev dev;
|
||||||
struct ccid *c = &ccid;
|
struct ccid *c = &ccid;
|
||||||
@@ -1725,7 +1719,9 @@ ccid_thread (void *arg)
|
|||||||
else
|
else
|
||||||
timeout_p = NULL;
|
timeout_p = NULL;
|
||||||
|
|
||||||
poll_event_intr (timeout_p, &c->ccid_comm, &interrupt);
|
eventflag_prepare_poll (&c->ccid_comm, &cond_poll_desc);
|
||||||
|
chopstx_poll (timeout_p, PD_SIZE, pd_array);
|
||||||
|
|
||||||
if (interrupt.ready)
|
if (interrupt.ready)
|
||||||
{
|
{
|
||||||
if (usb_event_handle (&dev) == 0)
|
if (usb_event_handle (&dev) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user