Skip to content

Commit 297ce02

Browse files
committed
xen/sound: switch xen_snd_front to use INVALID_GRANT_REF
Instead of using a private macro for an invalid grant reference use the common one. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Oleksandr Tyshchenko <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 only Signed-off-by: Juergen Gross <[email protected]>
1 parent cb52163 commit 297ce02

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

sound/xen/xen_snd_front_evtchnl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static void evtchnl_free(struct xen_snd_front_info *front_info,
167167
xenbus_free_evtchn(front_info->xb_dev, channel->port);
168168

169169
/* End access and free the page. */
170-
if (channel->gref != GRANT_INVALID_REF)
170+
if (channel->gref != INVALID_GRANT_REF)
171171
gnttab_end_foreign_access(channel->gref, page);
172172
else
173173
free_page(page);
@@ -207,7 +207,7 @@ static int evtchnl_alloc(struct xen_snd_front_info *front_info, int index,
207207
channel->index = index;
208208
channel->front_info = front_info;
209209
channel->state = EVTCHNL_STATE_DISCONNECTED;
210-
channel->gref = GRANT_INVALID_REF;
210+
channel->gref = INVALID_GRANT_REF;
211211
page = get_zeroed_page(GFP_KERNEL);
212212
if (!page) {
213213
ret = -ENOMEM;

sound/xen/xen_snd_front_evtchnl.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515

1616
struct xen_snd_front_info;
1717

18-
#ifndef GRANT_INVALID_REF
19-
/*
20-
* FIXME: usage of grant reference 0 as invalid grant reference:
21-
* grant reference 0 is valid, but never exposed to a PV driver,
22-
* because of the fact it is already in use/reserved by the PV console.
23-
*/
24-
#define GRANT_INVALID_REF 0
25-
#endif
26-
2718
/* Timeout in ms to wait for backend to respond. */
2819
#define VSND_WAIT_BACK_MS 3000
2920

0 commit comments

Comments
 (0)