firewire: cdev: amendment to "add ioctl to query maximum transmission speed"
The as yet unreleased FW_CDEV_IOC_GET_SPEED ioctl puts only a single integer into the parameter buffer. We can use ioctl()'s return value instead. (Also: Some whitespace change in firewire-cdev.h.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
6104ee92d6
commit
c8a25900f3
|
@ -1214,13 +1214,14 @@ static int ioctl_deallocate_iso_resource_once(struct client *client, void *buffe
|
|||
return init_iso_resource(client, request, ISO_RES_DEALLOC_ONCE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a speed code: Maximum speed to or from this device,
|
||||
* limited by the device's link speed, the local node's link speed,
|
||||
* and all PHY port speeds between the two links.
|
||||
*/
|
||||
static int ioctl_get_speed(struct client *client, void *buffer)
|
||||
{
|
||||
struct fw_cdev_get_speed *request = buffer;
|
||||
|
||||
request->max_speed = client->device->max_speed;
|
||||
|
||||
return 0;
|
||||
return client->device->max_speed;
|
||||
}
|
||||
|
||||
static int ioctl_send_broadcast_request(struct client *client, void *buffer)
|
||||
|
|
|
@ -244,7 +244,7 @@ union fw_cdev_event {
|
|||
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate)
|
||||
#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource)
|
||||
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource)
|
||||
#define FW_CDEV_IOC_GET_SPEED _IOR('#', 0x11, struct fw_cdev_get_speed)
|
||||
#define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */
|
||||
#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request)
|
||||
#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet)
|
||||
|
||||
|
@ -601,15 +601,6 @@ struct fw_cdev_allocate_iso_resource {
|
|||
__u32 handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_get_speed - Query maximum speed to or from this device
|
||||
* @max_speed: Speed code; minimum of the device's link speed, the local node's
|
||||
* link speed, and all PHY port speeds between the two links
|
||||
*/
|
||||
struct fw_cdev_get_speed {
|
||||
__u32 max_speed;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_send_stream_packet - send an asynchronous stream packet
|
||||
* @generation: Bus generation where the packet is valid
|
||||
|
|
Loading…
Reference in a new issue