Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[sfrench/cifs-2.6.git] / drivers / counter / ftm-quaddec.c
index 4046aa9f9234472522525387c1331baddde8a30d..c2b3fdfd8b7721980dcc3c6d03ca6dc6dfe194a9 100644 (file)
@@ -178,31 +178,25 @@ static const enum counter_count_function ftm_quaddec_count_functions[] = {
 
 static int ftm_quaddec_count_read(struct counter_device *counter,
                                  struct counter_count *count,
-                                 struct counter_count_read_value *val)
+                                 unsigned long *val)
 {
        struct ftm_quaddec *const ftm = counter->priv;
        uint32_t cntval;
 
        ftm_read(ftm, FTM_CNT, &cntval);
 
-       counter_count_read_value_set(val, COUNTER_COUNT_POSITION, &cntval);
+       *val = cntval;
 
        return 0;
 }
 
 static int ftm_quaddec_count_write(struct counter_device *counter,
                                   struct counter_count *count,
-                                  struct counter_count_write_value *val)
+                                  const unsigned long val)
 {
        struct ftm_quaddec *const ftm = counter->priv;
-       u32 cnt;
-       int err;
 
-       err = counter_count_write_value_get(&cnt, COUNTER_COUNT_POSITION, val);
-       if (err)
-               return err;
-
-       if (cnt != 0) {
+       if (val != 0) {
                dev_warn(&ftm->pdev->dev, "Can only accept '0' as new counter value\n");
                return -EINVAL;
        }