Blame view
include/linux/rar_register.h
1.72 KB
9cedb3924
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
/* * Copyright (C) 2010 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General * Public License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * The full GNU General Public License is included in this * distribution in the file called COPYING. */ #ifndef _RAR_REGISTER_H #define _RAR_REGISTER_H |
375d65db2
|
23 |
#include <linux/types.h> |
9cedb3924
|
24 25 |
/* following are used both in drivers as well as user space apps */ |
542385ee6
|
26 |
|
375d65db2
|
27 28 29 30 |
#define RAR_TYPE_VIDEO 0 #define RAR_TYPE_AUDIO 1 #define RAR_TYPE_IMAGE 2 #define RAR_TYPE_DATA 3 |
9cedb3924
|
31 |
|
375d65db2
|
32 |
#ifdef __KERNEL__ |
9cedb3924
|
33 |
|
375d65db2
|
34 |
struct rar_device; |
9cedb3924
|
35 |
|
62a8c3a32
|
36 |
#if defined(CONFIG_RAR_REGISTER) |
375d65db2
|
37 38 39 40 |
int register_rar(int num, int (*callback)(unsigned long data), unsigned long data); void unregister_rar(int num); int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); |
9cedb3924
|
41 |
int rar_lock(int rar_index); |
62a8c3a32
|
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#else extern void unregister_rar(int num) { } extern int rar_lock(int rar_index) { return -EIO; } extern inline int register_rar(int num, int (*callback)(unsigned long data), unsigned long data) { return -ENODEV; } extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end) { return -ENODEV; } #endif /* RAR_REGISTER */ |
542385ee6
|
57 |
|
9cedb3924
|
58 59 |
#endif /* __KERNEL__ */ #endif /* _RAR_REGISTER_H */ |