On Tuesday 12 April 2011, Mathieu Poirier wrote:I don't have a reason other than I thought what was found in omap_hwspinlock.c looked perfectly fine to me and there was no reason to proceed otherwise in 'u8500_hsem.c'.Not strictly required, but somewhat cleaner IMHO. If you have a goodstruct u8500_hsem_state {I don't see the real advantage in doing a single allocation - the
void __iomem *io_base;
struct u8500_hsem hsem[U8500_MAX_SEMAPHORE];
}
dynamic allocation method is also used in 'omap_hwspinlock.c'. Is
modification mandatory to get the driver accepted ?
reason for splitting the allocations, just document that clearly.
One more thing I just noticed: the hwspinlock_internal.h file definesI have to admit I'm not sure of what your asking here. Hwspinlocks should be administered by only one entity and this is what this driver is doing.
the hwspinlock->id field as "a global, unique, system-wide, index of
the lock", but the u8500 hsem just sets it to an integer starting
at zero. If there are multiple devices providing hwspinlocks in the
same system, that cannot work.
Arnd