diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-15 07:40:47 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-18 20:05:21 -0400 |
commit | 6e729b416b44296f5ed503b40ac58c2bffb43caf (patch) | |
tree | 62389c3aca9efc519b47fdcdff4a5131feb1ac6d /include/video/sh_mobile_meram.h | |
parent | 4a2371772146b30113c9c837eb32b64f18376c0d (diff) |
sh_mobile_meram: Use direct function calls for the public API
There's no reason to use abstract operation pointers to implement the
MERAM API. Replace them by direct function calls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/video/sh_mobile_meram.h')
-rw-r--r-- | include/video/sh_mobile_meram.h | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h index 8a5afaf2c6dc..11348379f093 100644 --- a/include/video/sh_mobile_meram.h +++ b/include/video/sh_mobile_meram.h | |||
@@ -15,7 +15,6 @@ enum { | |||
15 | 15 | ||
16 | 16 | ||
17 | struct sh_mobile_meram_priv; | 17 | struct sh_mobile_meram_priv; |
18 | struct sh_mobile_meram_ops; | ||
19 | 18 | ||
20 | /* | 19 | /* |
21 | * struct sh_mobile_meram_info - MERAM platform data | 20 | * struct sh_mobile_meram_info - MERAM platform data |
@@ -24,7 +23,6 @@ struct sh_mobile_meram_ops; | |||
24 | struct sh_mobile_meram_info { | 23 | struct sh_mobile_meram_info { |
25 | int addr_mode; | 24 | int addr_mode; |
26 | u32 reserved_icbs; | 25 | u32 reserved_icbs; |
27 | struct sh_mobile_meram_ops *ops; | ||
28 | struct sh_mobile_meram_priv *priv; | 26 | struct sh_mobile_meram_priv *priv; |
29 | struct platform_device *pdev; | 27 | struct platform_device *pdev; |
30 | }; | 28 | }; |
@@ -38,21 +36,43 @@ struct sh_mobile_meram_cfg { | |||
38 | struct sh_mobile_meram_icb_cfg icb[2]; | 36 | struct sh_mobile_meram_icb_cfg icb[2]; |
39 | }; | 37 | }; |
40 | 38 | ||
41 | struct module; | 39 | #if defined(CONFIG_FB_SH_MOBILE_MERAM) || \ |
42 | struct sh_mobile_meram_ops { | 40 | defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE) |
43 | struct module *module; | 41 | void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, |
44 | 42 | const struct sh_mobile_meram_cfg *cfg, | |
45 | /* LCDC cache management */ | 43 | unsigned int xres, unsigned int yres, |
46 | void *(*cache_alloc)(struct sh_mobile_meram_info *meram_dev, | 44 | unsigned int pixelformat, |
47 | const struct sh_mobile_meram_cfg *cfg, | 45 | unsigned int *pitch); |
48 | unsigned int xres, unsigned int yres, | 46 | void sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data); |
49 | unsigned int pixelformat, unsigned int *pitch); | 47 | void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, |
50 | void (*cache_free)(struct sh_mobile_meram_info *meram_dev, void *data); | 48 | unsigned long base_addr_y, |
51 | void (*cache_update)(struct sh_mobile_meram_info *meram_dev, void *data, | 49 | unsigned long base_addr_c, |
50 | unsigned long *icb_addr_y, | ||
51 | unsigned long *icb_addr_c); | ||
52 | #else | ||
53 | static inline void * | ||
54 | sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, | ||
55 | const struct sh_mobile_meram_cfg *cfg, | ||
56 | unsigned int xres, unsigned int yres, | ||
57 | unsigned int pixelformat, | ||
58 | unsigned int *pitch) | ||
59 | { | ||
60 | return ERR_PTR(-ENODEV); | ||
61 | } | ||
62 | |||
63 | static inline void | ||
64 | sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | static inline void | ||
69 | sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, | ||
52 | unsigned long base_addr_y, | 70 | unsigned long base_addr_y, |
53 | unsigned long base_addr_c, | 71 | unsigned long base_addr_c, |
54 | unsigned long *icb_addr_y, | 72 | unsigned long *icb_addr_y, |
55 | unsigned long *icb_addr_c); | 73 | unsigned long *icb_addr_c) |
56 | }; | 74 | { |
75 | } | ||
76 | #endif | ||
57 | 77 | ||
58 | #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */ | 78 | #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */ |