Make the PCMCIA core stop using class_interface to hide socket attribute
registration. This removes the associated section mismatch warnings, and
helps get to the point where that mechanism can finally be removed.
Simplify that attribute registration by using an attribute_group.
This is a net shrink in object size.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Cc: <linux-pcmcia@lists.infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When overriding the CIS, re-start the configuration of the card from
scratch. Reported and debugged by Fabrice Bellet <fabrice@bellet.info>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Instead of the two status values struct pcmcia_device->p_state and state,
use descriptive bitfields. Most value-checking in drivers was invalid, as
the core now only calls the ->remove() (a.k.a. detach) function in case the
attachement _and_ configuration was successful.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now.
Therefore, remove all such indirections.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Update the remaining users using the static lookup table of the PCMCIA
function configuration to use the struct pcmcia_device-contained pointer.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Access the PCMCIA config_t struct (one per device function) using
a pointer in struct pcmcia_device, instead of looking them up in
an array.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
config_t.Present is set to the same value as CardValues, which isn't modified
anywhere. Therefore, we can use only one of these two objects.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Merge the suspend and resume methods for 16-bit PCMCIA cards into the
device model -- for both runtime power management and suspend to ram/disk.
Bugfix in ds.c by Richard Purdie
Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Add a return value to pcmcia_validate_mem. Only if we have enough memory
available to map the CIS, we should proceed in trying to determine information
about the device.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
config_t->Vpp1, Vpp2 and Vcc are never read, so remove them.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
client_t and CLIENT_MAGIC are unused, so remove them
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Reduce the occurences of "client_handle_t" which is nothing else than a
pointer to struct pcmcia_device by now.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Move the "event handler" to struct pcmcia_driver -- the unified event handler
will disappear really soon, but switching it to struct pcmcia_driver in the
meantime allows for better "step-by-step" patches.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rename some functions in drivers/pcmcia/ to show they belong to the PCMCIA
subsystem.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Always rescan the devices upon echo'ing something to
available_resources_setup_done. This is needed for proper "coldplug" support.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The one thing which surprises me in this patch that cis->Length needs to be
set to count+1. Without it, it doesn't work, but with it, it doesn't make
sense to me.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!