Prex: Finding Guidance for Forward and Backward Porting of Linux Device Drivers
Julia Lawall, Derek Palinski, Lukas Gnirke, Gilles Muller (Inria/LIP6) January 12, 2017
(Unpublished work)
1
Prex: Finding Guidance for Forward and Backward Porting of Linux - - PowerPoint PPT Presentation
Prex: Finding Guidance for Forward and Backward Porting of Linux Device Drivers Julia Lawall, Derek Palinski, Lukas Gnirke, Gilles Muller (Inria/LIP6) January 12, 2017 (Unpublished work) 1 The porting problem driver 4.4 2 The porting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@@
#ifdef CONFIG_PM_SLEEP
int as3935_suspend (struct spi_device *spi , pm_message_t msg) +static int as3935_suspend (struct device *dev) {
iio_dev *indio_dev = spi_get_drvdata (spi ); + struct iio_dev *indio_dev = dev_get_drvdata (dev ); @@
int as3935_resume (struct spi_device *spi) +static int as3935_resume (struct device *dev) {
iio_dev *indio_dev = spi_get_drvdata (spi ); + struct iio_dev *indio_dev = dev_get_drvdata (dev ); @@
+static SIMPLE_DEV_PM_OPS (as3935_pm_ops , as3935_suspend , as3935_resume ); +#define AS3935_PM_OPS (& as3935_pm_ops ) #else
as3935_suspend NULL
as3935_resume NULL +#define AS3935_PM_OPS NULL #endif @@
.driver = { ... + .pm = AS3935_PM_OPS , }, ...
= as3935_suspend ,
= as3935_resume , 19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56