Skip to content

Commit

Permalink
Staging: rt2870sta: constify RTUSBMultiWrite(), RTUSBFirmwareWrite()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Hutchings authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 35f077d commit 8838d25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rt2860/rtmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/rt2870/common/rtusb_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -167,26 +167,26 @@ 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;

/* TODO: In 2870, use this funciton carefully cause it's not stable. */
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;
Expand Down

0 comments on commit 8838d25

Please sign in to comment.