]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
greybus: kill struct gmod_cport
authorAlex Elder <elder@linaro.org>
Wed, 1 Oct 2014 00:25:21 +0000 (19:25 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 1 Oct 2014 01:19:12 +0000 (18:19 -0700)
commit1cfc667d75d3a38989365da387f52a1c303c435d
tree43c8a7c25a91d0dd807ca7f2ac91acf3f5f1224b
parentf0f70916fba72ca70235ca40db43030ec8f467ad
greybus: kill struct gmod_cport

A UniPro (short header) segment has a 5-bit field to represent a
CPort Id.  In addition, the 7-bit L3 short header holds a UniPro
device id.  There can be no more than 128 devices in a UniPro
network, but these two fields can be combined in ways to allow for
over 2000 CPorts within a single device.  As a result, a device id
is represented with one byte, and a CPort Id within a device is
always representable with a two byte value.

This patch changes integral values that reresent CPort Ids so they
use type u16 consistently.

Separately, the contents of the gmod_cport structure were mostly
fabricated, with the cport_id field being the only one that's
meaningful.  This patch gets rid of that structure, putting a
simple u16 to represent the CPort Id everywhere it had been used
before.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/es1-ap-usb.c
drivers/staging/greybus/gbuf.c
drivers/staging/greybus/greybus.h
drivers/staging/greybus/kernel_ver.h
drivers/staging/greybus/svc_msg.h
drivers/staging/greybus/test_sink.c
drivers/staging/greybus/uart-gb.c