Staging: rt2870sta: constify RTUSBMultiWrite(), RTUSBFirmwareWrite()
These functions do not modify the data they are passed. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
35f077dca7
Коммит
8838d2560a
|
@ -4043,10 +4043,10 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
|
|||
u16 Offset, u8 *pData, u16 length);
|
||||
|
||||
int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u8 *pData, u16 length);
|
||||
u16 Offset, const u8 *pData, u16 length);
|
||||
|
||||
int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u8 *pData);
|
||||
u16 Offset, const u8 *pData);
|
||||
|
||||
int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd,
|
||||
u8 Id, u8 *pValue);
|
||||
|
@ -4112,7 +4112,7 @@ int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd,
|
|||
u16 Offset, u16 Value);
|
||||
|
||||
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
|
||||
u8 *pFwImage, unsigned long FwLen);
|
||||
const u8 *pFwImage, unsigned long FwLen);
|
||||
|
||||
int RTUSBVenderReset(struct rt_rtmp_adapter *pAd);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd)
|
|||
========================================================================
|
||||
*/
|
||||
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
|
||||
u8 *pFwImage, unsigned long FwLen)
|
||||
const u8 *pFwImage, unsigned long FwLen)
|
||||
{
|
||||
u32 MacReg;
|
||||
int Status;
|
||||
|
@ -167,7 +167,7 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
|
|||
========================================================================
|
||||
*/
|
||||
int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u8 *pData)
|
||||
u16 Offset, const u8 *pData)
|
||||
{
|
||||
int Status;
|
||||
|
||||
|
@ -175,18 +175,18 @@ int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
|||
Status = RTUSB_VendorRequest(pAd,
|
||||
USBD_TRANSFER_DIRECTION_OUT,
|
||||
DEVICE_VENDOR_REQUEST_OUT,
|
||||
0x6, 0, Offset, pData, 1);
|
||||
0x6, 0, Offset, (u8 *)pData, 1);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u8 *pData, u16 length)
|
||||
u16 Offset, const u8 *pData, u16 length)
|
||||
{
|
||||
int Status;
|
||||
|
||||
u16 index = 0, Value;
|
||||
u8 *pSrc = pData;
|
||||
const u8 *pSrc = pData;
|
||||
u16 resude = 0;
|
||||
|
||||
resude = length % 2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче