Skip to content

Commit

Permalink
Merge pull request #47 from jean-edouard/stable-9-fournineteen
Browse files Browse the repository at this point in the history
S9: openxt-vusb: fix function renamed in Linux 4.19
  • Loading branch information
Eric Chanudet authored Jul 25, 2019
2 parents 233d9dd + b249e32 commit 1548dda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openxt-vusb/openxt-vusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,12 @@ vusb_port_reset(struct vusb_vhcd *vhcd, struct vusb_rh_port *vport)
* Test reset gate, only want one reset in flight at a time per
* port. If the gate is set, it will return the "unless" value.
*/
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) )
/* https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=bfc18e389c7a09fbbbed6bf4032396685b14246e */
if (atomic_fetch_add_unless(&vport->reset_pending, 1, 1) == 1)
#else
if (__atomic_add_unless(&vport->reset_pending, 1, 1) == 1)
#endif
return;

/* Schedule it for the device, can't do it here in the vHCD lock */
Expand Down

0 comments on commit 1548dda

Please sign in to comment.