A device for cleaning of crankcase gas being produced in a crankcase during operation of an internal combustion engine, said device comprising - a centrifugal separator comprising a housing delimiting a separation chamber in which a centrifugal rotor is arranged for cleaning of said crankcase gas, wherein the rotor comprises a plurality of separation discs wherein the centrifugal separator is connected to a gas inlet for conducting a flow of crankcase gas from the crankcase to the centrifugal separator and a gas outlet for conducting the flow of gas from the centrifugal separator, - a motor which is arranged to rotate the centrifugal rotor, the motor being arranged with control equipment for changing the rotational speed of the motor and thereby of the centrifugal rotor, - a sensor for detection of a parameter, the magnitude of which is related to a gas pressure in the crankcase, the sensor being arranged to communicate with the control equipment of the motor, wherein - the control equipment is operatively connected to a valve (15, 15') which is arranged for adjusting the flow of gas through the centrifugal separator, wherein the control equipment is arranged to change the position of the valve (15, 15') in response to a detected change of said parameter in a way such that the gas pressure in the crankcase is maintained at a predetermined value, or at a predetermined pressure interval, during operation of the combustion engine and wherein the control equipment is arranged to change both the position of the valve (15, 15') and the rotational speed of the centrifugal rotor in a way such that the gas pressure in the crankcase is maintained at the predetermined value, or at the predetermined pressure interval, during operation of the combustion engine and further wherein the control equipment is arranged to prioritize the change of the valve (15, 15') position instead of changing the rotational speed of the centrifugal rotor to maintain the gas pressure in the crankcase during operation of the combustion engine. - a centrifugal separator comprising a housing delimiting a separation chamber in which a centrifugal rotor is arranged for cleaning of said crankcase gas, wherein the rotor comprises a plurality of separation discs wherein the centrifugal separator is connected to a gas inlet for conducting a flow of crankcase gas from the crankcase to the centrifugal separator and a gas outlet for conducting the flow of gas from the centrifugal separator, - a motor which is arranged to rotate the centrifugal rotor, the motor being arranged with control equipment for changing the rotational speed of the motor and thereby of the centrifugal rotor, - a sensor for detection of a parameter, the magnitude of which is related to a gas pressure in the crankcase, the sensor being arranged to communicate with the control equipment of the motor, wherein - the control equipment is operatively connected to a valve (15, 15') which is arranged for adjusting the flow of gas through the centrifugal separator, wherein the control equipment is arranged to change the position of the valve (15, 15') in response to a detected change of said parameter in a way such that the gas pressure in the crankcase is maintained at a predetermined value, or at a predetermined pressure interval, during operation of the combustion engine and wherein the control equipment is arranged to change both the position of the valve (15, 15') and the rotational speed of the centrifugal rotor in a way such that the gas pressure in the crankcase is maintained at the predetermined value, or at the predetermined pressure interval, during operation of the combustion engine and further wherein the control equipment is arranged to prioritize the change of the valve (15, 15') position instead of changing the rotational speed of the centrifugal rotor to maintain the gas pressure in the crankcase during operation of the combustion engine.