aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-05-06 23:42:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-08 13:46:56 -0400
commit8b2cc917a02936c3ea7d8da46801c7b7b6233093 (patch)
treec0aabb03ae6677d9aaeb2367f48c5be60e42c4c4 /drivers/scsi/dpt_i2o.c
parent5be7a4792a31df6f2cd44bfba8da467ea20a0642 (diff)
drivers/scsi/dpt_i2o.c: fix build on alpha
alpha: drivers/scsi/dpt_i2o.c:1997: error: implicit declaration of function 'adpt_alpha_info' drivers/scsi/dpt_i2o.c: At top level: drivers/scsi/dpt_i2o.c:2032: warning: conflicting types for 'adpt_alpha_info' drivers/scsi/dpt_i2o.c:2032: error: static declaration of 'adpt_alpha_info' follows non-static declaration drivers/scsi/dpt_i2o.c:1997: error: previous implicit declaration of 'adpt_alpha_info' was here Due to a copy-n-paste error in drivers/scsi/dpti.h. Fix that up and remove some of the many daft static-declarations-in-a-header which this driver enjoys. Cc: Miquel van Smoorenburg <miquels@cistron.nl> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c78
1 files changed, 36 insertions, 42 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 0fb5bf4c43ac..8508816f303d 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1967,45 +1967,6 @@ cleanup:
1967 return rcode; 1967 return rcode;
1968} 1968}
1969 1969
1970
1971/*
1972 * This routine returns information about the system. This does not effect
1973 * any logic and if the info is wrong - it doesn't matter.
1974 */
1975
1976/* Get all the info we can not get from kernel services */
1977static int adpt_system_info(void __user *buffer)
1978{
1979 sysInfo_S si;
1980
1981 memset(&si, 0, sizeof(si));
1982
1983 si.osType = OS_LINUX;
1984 si.osMajorVersion = 0;
1985 si.osMinorVersion = 0;
1986 si.osRevision = 0;
1987 si.busType = SI_PCI_BUS;
1988 si.processorFamily = DPTI_sig.dsProcessorFamily;
1989
1990#if defined __i386__
1991 adpt_i386_info(&si);
1992#elif defined (__ia64__)
1993 adpt_ia64_info(&si);
1994#elif defined(__sparc__)
1995 adpt_sparc_info(&si);
1996#elif defined (__alpha__)
1997 adpt_alpha_info(&si);
1998#else
1999 si.processorType = 0xff ;
2000#endif
2001 if(copy_to_user(buffer, &si, sizeof(si))){
2002 printk(KERN_WARNING"dpti: Could not copy buffer TO user\n");
2003 return -EFAULT;
2004 }
2005
2006 return 0;
2007}
2008
2009#if defined __ia64__ 1970#if defined __ia64__
2010static void adpt_ia64_info(sysInfo_S* si) 1971static void adpt_ia64_info(sysInfo_S* si)
2011{ 1972{
@@ -2016,7 +1977,6 @@ static void adpt_ia64_info(sysInfo_S* si)
2016} 1977}
2017#endif 1978#endif
2018 1979
2019
2020#if defined __sparc__ 1980#if defined __sparc__
2021static void adpt_sparc_info(sysInfo_S* si) 1981static void adpt_sparc_info(sysInfo_S* si)
2022{ 1982{
@@ -2026,7 +1986,6 @@ static void adpt_sparc_info(sysInfo_S* si)
2026 si->processorType = PROC_ULTRASPARC; 1986 si->processorType = PROC_ULTRASPARC;
2027} 1987}
2028#endif 1988#endif
2029
2030#if defined __alpha__ 1989#if defined __alpha__
2031static void adpt_alpha_info(sysInfo_S* si) 1990static void adpt_alpha_info(sysInfo_S* si)
2032{ 1991{
@@ -2038,7 +1997,6 @@ static void adpt_alpha_info(sysInfo_S* si)
2038#endif 1997#endif
2039 1998
2040#if defined __i386__ 1999#if defined __i386__
2041
2042static void adpt_i386_info(sysInfo_S* si) 2000static void adpt_i386_info(sysInfo_S* si)
2043{ 2001{
2044 // This is all the info we need for now 2002 // This is all the info we need for now
@@ -2059,9 +2017,45 @@ static void adpt_i386_info(sysInfo_S* si)
2059 break; 2017 break;
2060 } 2018 }
2061} 2019}
2020#endif
2021
2022/*
2023 * This routine returns information about the system. This does not effect
2024 * any logic and if the info is wrong - it doesn't matter.
2025 */
2062 2026
2027/* Get all the info we can not get from kernel services */
2028static int adpt_system_info(void __user *buffer)
2029{
2030 sysInfo_S si;
2031
2032 memset(&si, 0, sizeof(si));
2033
2034 si.osType = OS_LINUX;
2035 si.osMajorVersion = 0;
2036 si.osMinorVersion = 0;
2037 si.osRevision = 0;
2038 si.busType = SI_PCI_BUS;
2039 si.processorFamily = DPTI_sig.dsProcessorFamily;
2040
2041#if defined __i386__
2042 adpt_i386_info(&si);
2043#elif defined (__ia64__)
2044 adpt_ia64_info(&si);
2045#elif defined(__sparc__)
2046 adpt_sparc_info(&si);
2047#elif defined (__alpha__)
2048 adpt_alpha_info(&si);
2049#else
2050 si.processorType = 0xff ;
2063#endif 2051#endif
2052 if (copy_to_user(buffer, &si, sizeof(si))){
2053 printk(KERN_WARNING"dpti: Could not copy buffer TO user\n");
2054 return -EFAULT;
2055 }
2064 2056
2057 return 0;
2058}
2065 2059
2066static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, 2060static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd,
2067 ulong arg) 2061 ulong arg)