[kernel] r6894 - dists/trunk/linux-kbuild-2.6/src/mod
Bastian Blank
waldi at costa.debian.org
Sun Jun 25 12:46:44 UTC 2006
Author: waldi
Date: Sun Jun 25 12:46:43 2006
New Revision: 6894
Modified:
dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.cpp
dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.hpp
Log:
src/mod/module_devicetable_impl_2_6_16.cpp, src/mod/module_devicetable_impl_2_6_16.hpp
- Implement vio.
- Mark variables as unused.
Modified: dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.cpp
==============================================================================
--- dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.cpp (original)
+++ dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.cpp Sun Jun 25 12:46:43 2006
@@ -70,7 +70,7 @@
{
}
-void table_entry_version<device_i2c, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
+void table_entry_version<device_i2c, version_2_6_16>::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error)
{
}
@@ -94,7 +94,7 @@
{
}
-void table_entry_version<device_input, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
+void table_entry_version<device_input, version_2_6_16>::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error)
{
}
@@ -102,7 +102,7 @@
{
}
-void table_entry_version<device_of, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
+void table_entry_version<device_of, version_2_6_16>::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error)
{
}
@@ -142,7 +142,7 @@
{
}
-void table_entry_version<device_pcmcia, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
+void table_entry_version<device_pcmcia, version_2_6_16>::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error)
{
}
@@ -160,7 +160,7 @@
{
}
-void table_entry_version<device_serio, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
+void table_entry_version<device_serio, version_2_6_16>::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error)
{
}
@@ -204,12 +204,9 @@
bInterfaceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL, true);
}
-table_entry_version<device_vio, version_2_6_16>::table_entry_version () throw ()
-{
-}
-
void table_entry_version<device_vio, version_2_6_16>::write (std::ostream &out) const throw (std::runtime_error)
{
+ out << "vio:" << str << '*';
}
#define _do_convert(name) name = Elf::convert<Elf_data, typeof (id.name)> () (id.name)
@@ -225,7 +222,7 @@
}
template<typename Elf_class, typename Elf_data>
-table_entry_data<device_i2c, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_i2c, Elf_class> &id) throw ()
+table_entry_data<device_i2c, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_i2c, Elf_class> &id __attribute__ ((unused))) throw ()
{
throw std::runtime_error ("Not implemented: I2C");
}
@@ -241,13 +238,13 @@
}
template<typename Elf_class, typename Elf_data>
-table_entry_data<device_input, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_input, Elf_class> &id) throw ()
+table_entry_data<device_input, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_input, Elf_class> &id __attribute__ ((unused))) throw ()
{
throw std::runtime_error ("Not implemented: INPUT");
}
template<typename Elf_class, typename Elf_data>
-table_entry_data<device_of, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_of, Elf_class> &id) throw ()
+table_entry_data<device_of, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_of, Elf_class> &id __attribute__ ((unused))) throw ()
{
throw std::runtime_error ("Not implemented: OF");
}
@@ -264,7 +261,7 @@
}
template<typename Elf_class, typename Elf_data>
-table_entry_data<device_pcmcia, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_pcmcia, Elf_class> &id) throw ()
+table_entry_data<device_pcmcia, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_pcmcia, Elf_class> &id __attribute__ ((unused))) throw ()
{
throw std::runtime_error ("Not implemented: PCMCIA");
}
@@ -295,7 +292,7 @@
}
template<typename Elf_class, typename Elf_data>
-table_entry_data<device_serio, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_serio, Elf_class> &id) throw ()
+table_entry_data<device_serio, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_serio, Elf_class> &id __attribute__((unused))) throw ()
{
throw std::runtime_error ("Not implemented: SERIO");
}
@@ -368,7 +365,10 @@
template<typename Elf_class, typename Elf_data>
table_entry_data<device_vio, version_2_6_16, Elf_class, Elf_data>::table_entry_data (const device_id<device_vio, Elf_class> &id) throw ()
{
- throw std::runtime_error ("Not implemented: VIO");
+ std::stringstream s;
+ s << 'T' << (id.type[0] ? id.type : "*");
+ s << 'S' << (id.compat[0] ? id.compat : "*");
+ str = s.str ();
}
template<typename device, typename Elf_class, typename Elf_data>
Modified: dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.hpp
==============================================================================
--- dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.hpp (original)
+++ dists/trunk/linux-kbuild-2.6/src/mod/module_devicetable_impl_2_6_16.hpp Sun Jun 25 12:46:43 2006
@@ -170,6 +170,13 @@
USB_DEVICE_ID_MATCH_INT_PROTOCOL = 0x0200,
};
+ template<typename Elf_class>
+ struct device_id<device_vio, Elf_class>
+ {
+ char type[32];
+ char compat[32];
+ };
+
template<typename type>
class identifier_value
{
@@ -485,8 +492,9 @@
class table_entry_version<device_vio, version_2_6_16> : public table_entry
{
public:
- table_entry_version () throw ();
void write (std::ostream &) const throw (std::runtime_error);
+
+ std::string str;
};
template<typename Elf_class, typename Elf_data>
More information about the Kernel-svn-changes
mailing list