X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-max6902.c;h=d9417072807506771280912c887d5c8c9da27877;hb=7a44e910f43cbb5186e7242f4c32b3a5d2fb6666;hp=2c9739562b5c284a740d2e004ab776abeaf0039a;hpb=8e12ecc2b5a4521a338d7681e7d5547080fc6f71;p=linux-2.6 diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 2c9739562b..d941707280 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c @@ -1,4 +1,4 @@ -/* drivers/char/max6902.c +/* drivers/rtc/rtc-max6902.c * * Copyright (C) 2006 8D Technologies inc. * Copyright (C) 2004 Compulab Ltd. @@ -19,7 +19,6 @@ * - Initial driver creation. */ -#include #include #include @@ -137,7 +136,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt) dt->tm_min = BCD2BIN(chip->buf[2]); dt->tm_hour = BCD2BIN(chip->buf[3]); dt->tm_mday = BCD2BIN(chip->buf[4]); - dt->tm_mon = BCD2BIN(chip->buf[5] - 1); + dt->tm_mon = BCD2BIN(chip->buf[5]) - 1; dt->tm_wday = BCD2BIN(chip->buf[6]); dt->tm_year = BCD2BIN(chip->buf[7]); @@ -207,7 +206,7 @@ static int max6902_set_time(struct device *dev, struct rtc_time *tm) return max6902_set_datetime(dev, tm); } -static struct rtc_class_ops max6902_rtc_ops = { +static const struct rtc_class_ops max6902_rtc_ops = { .read_time = max6902_read_time, .set_time = max6902_set_time, };