diff options
Diffstat (limited to 'drivers/media/IR/ir-sysfs.c')
-rw-r--r-- | drivers/media/IR/ir-sysfs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index d73589ad55e6..d67c11d9921f 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
@@ -39,9 +39,9 @@ static ssize_t show_protocol(struct device *d, | |||
39 | { | 39 | { |
40 | char *s; | 40 | char *s; |
41 | struct ir_input_dev *ir_dev = dev_get_drvdata(d); | 41 | struct ir_input_dev *ir_dev = dev_get_drvdata(d); |
42 | enum ir_type ir_type = ir_dev->rc_tab.ir_type; | 42 | u64 ir_type = ir_dev->rc_tab.ir_type; |
43 | 43 | ||
44 | IR_dprintk(1, "Current protocol is %ld\n", ir_type); | 44 | IR_dprintk(1, "Current protocol is %lld\n", (long long)ir_type); |
45 | 45 | ||
46 | /* FIXME: doesn't support multiple protocols at the same time */ | 46 | /* FIXME: doesn't support multiple protocols at the same time */ |
47 | if (ir_type == IR_TYPE_UNKNOWN) | 47 | if (ir_type == IR_TYPE_UNKNOWN) |
@@ -77,7 +77,7 @@ static ssize_t store_protocol(struct device *d, | |||
77 | size_t len) | 77 | size_t len) |
78 | { | 78 | { |
79 | struct ir_input_dev *ir_dev = dev_get_drvdata(d); | 79 | struct ir_input_dev *ir_dev = dev_get_drvdata(d); |
80 | enum ir_type ir_type = IR_TYPE_UNKNOWN; | 80 | u64 ir_type = IR_TYPE_UNKNOWN; |
81 | int rc = -EINVAL; | 81 | int rc = -EINVAL; |
82 | unsigned long flags; | 82 | unsigned long flags; |
83 | char *buf; | 83 | char *buf; |
@@ -92,7 +92,8 @@ static ssize_t store_protocol(struct device *d, | |||
92 | ir_type = IR_TYPE_NEC; | 92 | ir_type = IR_TYPE_NEC; |
93 | 93 | ||
94 | if (ir_type == IR_TYPE_UNKNOWN) { | 94 | if (ir_type == IR_TYPE_UNKNOWN) { |
95 | IR_dprintk(1, "Error setting protocol to %ld\n", ir_type); | 95 | IR_dprintk(1, "Error setting protocol to %lld\n", |
96 | (long long)ir_type); | ||
96 | return -EINVAL; | 97 | return -EINVAL; |
97 | } | 98 | } |
98 | 99 | ||
@@ -101,7 +102,8 @@ static ssize_t store_protocol(struct device *d, | |||
101 | ir_type); | 102 | ir_type); |
102 | 103 | ||
103 | if (rc < 0) { | 104 | if (rc < 0) { |
104 | IR_dprintk(1, "Error setting protocol to %ld\n", ir_type); | 105 | IR_dprintk(1, "Error setting protocol to %lld\n", |
106 | (long long)ir_type); | ||
105 | return -EINVAL; | 107 | return -EINVAL; |
106 | } | 108 | } |
107 | 109 | ||
@@ -109,7 +111,8 @@ static ssize_t store_protocol(struct device *d, | |||
109 | ir_dev->rc_tab.ir_type = ir_type; | 111 | ir_dev->rc_tab.ir_type = ir_type; |
110 | spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags); | 112 | spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags); |
111 | 113 | ||
112 | IR_dprintk(1, "Current protocol is %ld\n", ir_type); | 114 | IR_dprintk(1, "Current protocol is %lld\n", |
115 | (long long)ir_type); | ||
113 | 116 | ||
114 | return len; | 117 | return len; |
115 | } | 118 | } |