Re: [PATCH 6/7] ir-core: make struct rc_dev the primary interface
On Wed, 10 Nov 2010 02:31:24 -0200, Mauro Carvalho Chehab wrote: > Em 29-10-2010 17:08, David Härdeman escreveu: >> This patch merges the ir_input_dev and ir_dev_props structs into a single >> struct called rc_dev. The drivers and various functions in rc-core used >> by the drivers are also changed to use rc_dev as the primary interface >> when dealing with rc-core. >> >> This means that the input_dev is abstracted away from the drivers which >> is necessary if we ever want to support multiple input devs per rc >> device. >> >> The new API is similar to what the input subsystem uses, i.e: >> rc_device_alloc() >> rc_device_free() >> rc_device_register() >> rc_device_unregister() >> > > > David, > >> +struct rc_dev *rdev; > ... >> +struct rc_dev *dev; /* pointer to the >> parent rc_dev */ > >> +struct rc_dev *rc; > > > A quick comment: try to call this struct with the same name on all places, > avoiding to call it as just "dev". It makes harder to understand the code, > especially on complex devices that have several types of dev's. The better > is to always call it as "rc_dev". Fair enough. I can fix that in a separate patch, or in a respin of my original patch. But first I need to know what I should base a new patch on...I'm confused by now -- David Härdeman -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/7] ir-core: make struct rc_dev the primary interface
Em 29-10-2010 17:08, David Härdeman escreveu: > This patch merges the ir_input_dev and ir_dev_props structs into a single > struct called rc_dev. The drivers and various functions in rc-core used > by the drivers are also changed to use rc_dev as the primary interface > when dealing with rc-core. > > This means that the input_dev is abstracted away from the drivers which > is necessary if we ever want to support multiple input devs per rc device. > > The new API is similar to what the input subsystem uses, i.e: > rc_device_alloc() > rc_device_free() > rc_device_register() > rc_device_unregister() > David, > + struct rc_dev *rdev; ... > + struct rc_dev *dev; /* pointer to the > parent rc_dev */ > + struct rc_dev *rc; A quick comment: try to call this struct with the same name on all places, avoiding to call it as just "dev". It makes harder to understand the code, especially on complex devices that have several types of dev's. The better is to always call it as "rc_dev". Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/7] ir-core: make struct rc_dev the primary interface
On Fri, Oct 29, 2010 at 3:08 PM, David Härdeman wrote: > This patch merges the ir_input_dev and ir_dev_props structs into a single > struct called rc_dev. The drivers and various functions in rc-core used > by the drivers are also changed to use rc_dev as the primary interface > when dealing with rc-core. > > This means that the input_dev is abstracted away from the drivers which > is necessary if we ever want to support multiple input devs per rc device. > > The new API is similar to what the input subsystem uses, i.e: > rc_device_alloc() > rc_device_free() > rc_device_register() > rc_device_unregister() > > Signed-off-by: David Härdeman Acked-by: Jarod Wilson Tested-by: Jarod Wilson Tested mceusb, streamzap, imon and nuvonton-cir. -- Jarod Wilson ja...@wilsonet.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html