spin_unlock_irqrestore(&rtc_lock, flags); 
int m41t81_set_time(unsigned long t){	struct rtc_time tm;	to_tm(t, &tm);	/*	 * Note the write order matters as it ensures the correctness.	 * When we write sec, 10th sec is clear.  It is reasonable to	 * believe we should finish writing min within a second.	 */	tm.tm_sec = BIN2BCD(tm.tm_sec);	m41t81_write(M41T81REG_SC, tm.tm_sec);	tm.tm_min = BIN2BCD(tm.tm_min);	m41t81_write(M41T81REG_MN, tm.tm_min);	tm.tm_hour = BIN2BCD(tm.tm_hour);	tm.tm_hour = (tm.tm_hour & 0x3f) | (m41t81_read(M41T81REG_HR) & 0xc0);	m41t81_write(M41T81REG_HR, tm.tm_hour);	/* tm_wday starts from 0 to 6 */	if (tm.tm_wday == 0) tm.tm_wday = 7;	tm.tm_wday = BIN2BCD(tm.tm_wday);	m41t81_write(M41T81REG_DY, tm.tm_wday);	tm.tm_mday = BIN2BCD(tm.tm_mday);	m41t81_write(M41T81REG_DT, tm.tm_mday);	/* tm_mon starts from 0, *ick* */	tm.tm_mon ++;	tm.tm_mon = BIN2BCD(tm.tm_mon);	m41t81_write(M41T81REG_MO, tm.tm_mon);	/* we don't do century, everything is beyond 2000 */	tm.tm_year %= 100;	tm.tm_year = BIN2BCD(tm.tm_year);	m41t81_write(M41T81REG_YR, tm.tm_year);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/53c2df2f4ebbc1d8231ca7cc13ac5381230888b1/rtc_m41t81.c/clean/arch/mips/sibyte/swarm/rtc_m41t81.c