File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 28
28
#include <sound/max98088.h>
29
29
#include "max98088.h"
30
30
31
+ enum max98088_type {
32
+ MAX98088 ,
33
+ MAX98089 ,
34
+ };
35
+
31
36
struct max98088_cdata {
32
37
unsigned int rate ;
33
38
unsigned int fmt ;
@@ -36,6 +41,7 @@ struct max98088_cdata {
36
41
37
42
struct max98088_priv {
38
43
u8 reg_cache [M98088_REG_CNT ];
44
+ enum max98088_type devtype ;
39
45
void * control_data ;
40
46
struct max98088_pdata * pdata ;
41
47
unsigned int sysclk ;
@@ -2040,6 +2046,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
2040
2046
if (max98088 == NULL )
2041
2047
return - ENOMEM ;
2042
2048
2049
+ max98088 -> devtype = id -> driver_data ;
2050
+
2043
2051
i2c_set_clientdata (i2c , max98088 );
2044
2052
max98088 -> control_data = i2c ;
2045
2053
max98088 -> pdata = i2c -> dev .platform_data ;
@@ -2059,7 +2067,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client)
2059
2067
}
2060
2068
2061
2069
static const struct i2c_device_id max98088_i2c_id [] = {
2062
- { "max98088" , 0 },
2070
+ { "max98088" , MAX98088 },
2071
+ { "max98089" , MAX98089 },
2063
2072
{ }
2064
2073
};
2065
2074
MODULE_DEVICE_TABLE (i2c , max98088_i2c_id );
You can’t perform that action at this time.
0 commit comments