From 8d0aab2f16c4fa170f32e7a74a52cd0122bbafef Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Mon, 28 Apr 2008 02:14:46 -0700 Subject: [PATCH] gpiolib: dynamic gpio number allocation If gpio_chip->base is negative during registration, gpiolib performs dynamic base allocation. This is useful for devices that aren't always present, such as GPIOs on hotplugged devices rather than mainboards. (This behavior was previously specified but not implemented.) To avoid using any numbers that may have been explicitly assigned but not yet registered, this dynamic allocation assigns GPIO numbers from the biggest number on down, instead of from the smallest on up. Signed-off-by: Anton Vorontsov Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed