From: Viresh Kumar Date: Fri, 23 Mar 2012 22:02:30 +0000 (-0700) Subject: rtc/rtc-spear: call platform_set_drvdata() before registering rtc device X-Git-Tag: v3.4-rc1~109^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee6c54ca64416c75aa6f5021e139f270192bae49;p=pandora-kernel.git rtc/rtc-spear: call platform_set_drvdata() before registering rtc device rtc_device_register() calls rtc-spear routines internally. These routines call dev_get_drvdata() to get struct spear_rtc_config. Currently, platform_set_drvdata is called after rtc device is registered. This causes system to crash, as dev_get_drvdata returns NULL. For this we need to call platform_set_drvdata() before registering rtc device. This requires further cleanup, that leads to removal of dev_set_drvdata on rtc->dev, which was just not required at all. Also, we change the parameter to request_irq and pass pointer to config instead of pointer to rtc struct. This patch brings all above changes. Signed-off-by: Viresh Kumar Cc: Shiraz Hashim Cc: Deepak Sikri Acked-by: Rajeev Kumar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed