Source
771
771
};
772
772
773
773
/**
774
774
* ds1685_rtc_proc - procfs access function.
775
775
* @dev: pointer to device structure.
776
776
* @seq: pointer to seq_file structure.
777
777
*/
778
778
static int
779
779
ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
780
780
{
781
-
struct platform_device *pdev = to_platform_device(dev);
782
-
struct ds1685_priv *rtc = platform_get_drvdata(pdev);
781
+
struct ds1685_priv *rtc = dev_get_drvdata(dev);
783
782
u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
784
783
char *model;
785
784
786
785
/* Read all the relevant data from the control registers. */
787
786
ds1685_rtc_switch_to_bank1(rtc);
788
787
ds1685_rtc_get_ssn(rtc, ssn);
789
788
ctrla = rtc->read(rtc, RTC_CTRL_A);
790
789
ctrlb = rtc->read(rtc, RTC_CTRL_B);
791
790
ctrlc = rtc->read(rtc, RTC_CTRL_C);
792
791
ctrld = rtc->read(rtc, RTC_CTRL_D);